From 7f39bae0568306aa98800b8b5150d68b279e3528 Mon Sep 17 00:00:00 2001
From: "thestig@chromium.org"
 <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue, 18 Oct 2011 20:20:03 +0000
Subject: [PATCH] Revert 106069 - Fix for Memory Leak 72698_b

BUG=72698
TEST=


Review URL: http://codereview.chromium.org/8330018

TBR=nrqv63@motorola.com
Review URL: http://codereview.chromium.org/8349007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106112 0039d316-1c4b-4281-b951-d872f2087c98
---
 AUTHORS                                         | 1 -
 chrome/browser/profiles/profile_impl_io_data.cc | 3 +--
 chrome/browser/profiles/profile_impl_io_data.h  | 1 -
 tools/valgrind/memcheck/suppressions.txt        | 7 +++++++
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 014ad8676c9bd..fdef97c02dc95 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -136,4 +136,3 @@ Nayan Kumar K <qtc746@motorola.com>
 ShankarGanesh K <blr.bmlab@gmail.com>
 Goutham Jagannatha <wrm364@motorola.com>
 Rosen Dash <rosen.dash@gmail.com>
-Parag Radke <nrqv63@motorola.com>
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 60807ace4c166..d6ef5ece476a9 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -393,9 +393,8 @@ void ProfileImplIOData::LazyInitializeInternal(
   main_context->set_http_transaction_factory(main_cache);
   media_request_context_->set_http_transaction_factory(media_cache);
 
-  ftp_factory_.reset(
+  main_context->set_ftp_transaction_factory(
       new net::FtpNetworkLayer(io_thread_globals->host_resolver.get()));
-  main_context->set_ftp_transaction_factory(ftp_factory_.get());
 
   main_context->set_chrome_url_data_manager_backend(
       chrome_url_data_manager_backend());
diff --git a/chrome/browser/profiles/profile_impl_io_data.h b/chrome/browser/profiles/profile_impl_io_data.h
index 1c13eedd61226..417fa7868838e 100644
--- a/chrome/browser/profiles/profile_impl_io_data.h
+++ b/chrome/browser/profiles/profile_impl_io_data.h
@@ -139,7 +139,6 @@ class ProfileImplIOData : public ProfileIOData {
 
   mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
   mutable scoped_ptr<net::HttpTransactionFactory> media_http_factory_;
-  mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_;
 
   mutable scoped_ptr<chrome_browser_net::Predictor> predictor_;
   mutable scoped_ptr<chrome_browser_net::HttpServerPropertiesManager>
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 296b102e998e9..7199196ede59c 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -3126,6 +3126,13 @@
    ...
    fun:_ZN13ProfileIOData20InitializeOnUIThreadEP7Profile
 }
+{
+   bug_72698_b
+   Memcheck:Leak
+   fun:_Znw*
+   ...
+   fun:_ZNK13ProfileIOData14LazyInitializeEv
+}
 {
    bug_73132
    Memcheck:Leak