summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-08 01:45:33 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-08 01:45:33 +0000
commitb1961608d77bfe3333cb7b822a60e23bed893b62 (patch)
treec2d92a6ec9ff075437639454dab9c2e09ca323a2
parent2f08fa694064d2e1142f1fa16ae0b13111222c59 (diff)
downloadchromium_src-b1961608d77bfe3333cb7b822a60e23bed893b62.zip
chromium_src-b1961608d77bfe3333cb7b822a60e23bed893b62.tar.gz
chromium_src-b1961608d77bfe3333cb7b822a60e23bed893b62.tar.bz2
Remove unused SyncProxyServiceHelper.
This used to be used in webkit/test_shell's request context, about 5 years ago. It's no longer being used by anything anymore. BUG=none Review URL: https://codereview.chromium.org/365743002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281624 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/proxy/proxy_service.cc73
-rw-r--r--net/proxy/proxy_service.h36
2 files changed, 0 insertions, 109 deletions
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index b80b31c..9197073 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -1582,77 +1582,4 @@ void ProxyService::OnDNSChanged() {
OnIPAddressChanged();
}
-SyncProxyServiceHelper::SyncProxyServiceHelper(
- base::MessageLoop* io_message_loop,
- ProxyService* proxy_service)
- : io_message_loop_(io_message_loop),
- proxy_service_(proxy_service),
- event_(false, false),
- callback_(base::Bind(&SyncProxyServiceHelper::OnCompletion,
- base::Unretained(this))) {
- DCHECK(io_message_loop_ != base::MessageLoop::current());
-}
-
-int SyncProxyServiceHelper::ResolveProxy(const GURL& url,
- ProxyInfo* proxy_info,
- const BoundNetLog& net_log) {
- DCHECK(io_message_loop_ != base::MessageLoop::current());
-
- io_message_loop_->PostTask(
- FROM_HERE,
- base::Bind(&SyncProxyServiceHelper::StartAsyncResolve, this, url,
- net_log));
-
- event_.Wait();
-
- if (result_ == net::OK) {
- *proxy_info = proxy_info_;
- }
- return result_;
-}
-
-int SyncProxyServiceHelper::ReconsiderProxyAfterError(
- const GURL& url, int net_error, ProxyInfo* proxy_info,
- const BoundNetLog& net_log) {
- DCHECK(io_message_loop_ != base::MessageLoop::current());
-
- io_message_loop_->PostTask(
- FROM_HERE,
- base::Bind(&SyncProxyServiceHelper::StartAsyncReconsider, this, url,
- net_error, net_log));
-
- event_.Wait();
-
- if (result_ == net::OK) {
- *proxy_info = proxy_info_;
- }
- return result_;
-}
-
-SyncProxyServiceHelper::~SyncProxyServiceHelper() {}
-
-void SyncProxyServiceHelper::StartAsyncResolve(const GURL& url,
- const BoundNetLog& net_log) {
- result_ = proxy_service_->ResolveProxy(
- url, &proxy_info_, callback_, NULL, net_log);
- if (result_ != net::ERR_IO_PENDING) {
- OnCompletion(result_);
- }
-}
-
-void SyncProxyServiceHelper::StartAsyncReconsider(const GURL& url,
- int net_error,
- const BoundNetLog& net_log) {
- result_ = proxy_service_->ReconsiderProxyAfterError(
- url, net_error, &proxy_info_, callback_, NULL, net_log);
- if (result_ != net::ERR_IO_PENDING) {
- OnCompletion(result_);
- }
-}
-
-void SyncProxyServiceHelper::OnCompletion(int rv) {
- result_ = rv;
- event_.Signal();
-}
-
} // namespace net
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 146acde..036dbb3 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -477,42 +477,6 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
DISALLOW_COPY_AND_ASSIGN(ProxyService);
};
-// Wrapper for invoking methods on a ProxyService synchronously.
-class NET_EXPORT SyncProxyServiceHelper
- : public base::RefCountedThreadSafe<SyncProxyServiceHelper> {
- public:
- SyncProxyServiceHelper(base::MessageLoop* io_message_loop,
- ProxyService* proxy_service);
-
- int ResolveProxy(const GURL& url,
- ProxyInfo* proxy_info,
- const BoundNetLog& net_log);
- int ReconsiderProxyAfterError(const GURL& url,
- int net_error,
- ProxyInfo* proxy_info,
- const BoundNetLog& net_log);
-
- private:
- friend class base::RefCountedThreadSafe<SyncProxyServiceHelper>;
-
- virtual ~SyncProxyServiceHelper();
-
- void StartAsyncResolve(const GURL& url, const BoundNetLog& net_log);
- void StartAsyncReconsider(const GURL& url,
- int net_error,
- const BoundNetLog& net_log);
-
- void OnCompletion(int result);
-
- base::MessageLoop* io_message_loop_;
- ProxyService* proxy_service_;
-
- base::WaitableEvent event_;
- CompletionCallback callback_;
- ProxyInfo proxy_info_;
- int result_;
-};
-
} // namespace net
#endif // NET_PROXY_PROXY_SERVICE_H_