summaryrefslogtreecommitdiffstats
path: root/net/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy')
-rw-r--r--net/proxy/proxy_script_fetcher.cc43
-rw-r--r--net/proxy/proxy_script_fetcher.h2
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_