diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-10 06:10:51 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-10 06:10:51 +0000 |
commit | 8bd001c65bac6b78566dc11009767a40d260aeff (patch) | |
tree | 63394d49cdaacc98dee88256e0b8d72a3e576d08 /net/proxy | |
parent | 0aa26f4be3c0590ca2876f017e6ad4f244dd35e3 (diff) | |
download | chromium_src-8bd001c65bac6b78566dc11009767a40d260aeff.zip chromium_src-8bd001c65bac6b78566dc11009767a40d260aeff.tar.gz chromium_src-8bd001c65bac6b78566dc11009767a40d260aeff.tar.bz2 |
Revert 62105 - Test change to fix a leak. Will revert after getting in a run on ChromiumOS valgrind bots.
Revert "Revert 60739 (still leaks on ChromiumOS!) - Reland r59972: Eagerly set the IO loop used for OCSP."
Review URL: http://codereview.chromium.org/3681003
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/3669003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62107 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy')
-rw-r--r-- | net/proxy/proxy_script_fetcher.cc | 43 | ||||
-rw-r--r-- | net/proxy/proxy_script_fetcher.h | 2 |
2 files changed, 0 insertions, 45 deletions
diff --git a/net/proxy/proxy_script_fetcher.cc b/net/proxy/proxy_script_fetcher.cc index 1858370..719c380 100644 --- a/net/proxy/proxy_script_fetcher.cc +++ b/net/proxy/proxy_script_fetcher.cc @@ -4,15 +4,11 @@ #include "net/proxy/proxy_script_fetcher.h" -#include <set> - #include "base/compiler_specific.h" #include "base/i18n/icu_string_conversions.h" -#include "base/lazy_instance.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/ref_counted.h" -#include "base/stl_util-inl.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "net/base/io_buffer.h" @@ -73,44 +69,8 @@ void ConvertResponseToUTF16(const std::string& charset, utf16); } -class ProxyScriptFetcherTracker { - public: - ProxyScriptFetcherTracker(); - ~ProxyScriptFetcherTracker(); - - void AddFetcher(ProxyScriptFetcher* fetcher) { - DCHECK(!ContainsKey(fetchers_, fetcher)); - fetchers_.insert(fetcher); - } - - void RemoveFetcher(ProxyScriptFetcher* fetcher) { - DCHECK(ContainsKey(fetchers_, fetcher)); - fetchers_.erase(fetcher); - } - - void CancelAllFetches() { - for (std::set<ProxyScriptFetcher*>::const_iterator it = fetchers_.begin(); - it != fetchers_.end(); ++it) { - (*it)->Cancel(); - } - } - - private: - std::set<ProxyScriptFetcher*> fetchers_; -}; - -ProxyScriptFetcherTracker::ProxyScriptFetcherTracker() {} -ProxyScriptFetcherTracker::~ProxyScriptFetcherTracker() {} - -base::LazyInstance<ProxyScriptFetcherTracker> - g_fetcher_tracker(base::LINKER_INITIALIZED); - } // namespace -void EnsureNoProxyScriptFetches() { - g_fetcher_tracker.Get().CancelAllFetches(); -} - class ProxyScriptFetcherImpl : public ProxyScriptFetcher, public URLRequest::Delegate { public: @@ -200,11 +160,9 @@ ProxyScriptFetcherImpl::ProxyScriptFetcherImpl( result_code_(OK), result_text_(NULL) { DCHECK(url_request_context); - g_fetcher_tracker.Get().AddFetcher(this); } ProxyScriptFetcherImpl::~ProxyScriptFetcherImpl() { - g_fetcher_tracker.Get().RemoveFetcher(this); // The URLRequest's destructor will cancel the outstanding request, and // ensure that the delegate (this) is not called again. } @@ -408,5 +366,4 @@ size_t ProxyScriptFetcher::SetSizeConstraintForUnittest(size_t size_bytes) { return prev; } - } // namespace net diff --git a/net/proxy/proxy_script_fetcher.h b/net/proxy/proxy_script_fetcher.h index 1b1a827..f6c1795 100644 --- a/net/proxy/proxy_script_fetcher.h +++ b/net/proxy/proxy_script_fetcher.h @@ -68,8 +68,6 @@ class ProxyScriptFetcher { static size_t SetSizeConstraintForUnittest(size_t size_bytes); }; -void EnsureNoProxyScriptFetches(); - } // namespace net #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_H_ |