summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_service.cc
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 00:25:12 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 00:25:12 +0000
commitec08bb23238e41b66daa676c3c55f23544a0de14 (patch)
treeaef939a8d5cccb67d037d8d055380a82e95bbfaa /net/proxy/proxy_service.cc
parentdb471b330fc82a9f450807ec1f4307c29dda23c4 (diff)
downloadchromium_src-ec08bb23238e41b66daa676c3c55f23544a0de14.zip
chromium_src-ec08bb23238e41b66daa676c3c55f23544a0de14.tar.gz
chromium_src-ec08bb23238e41b66daa676c3c55f23544a0de14.tar.bz2
Add a "LoadLog" parameter to transactions, hostresolver, clientsocketpool and proyxservice.This dependency comes from the parent URLRequest, and is used as a container for per-request profiling data.This change is strictly a no-op refactor -- the parameter is unused, and LoadLog does nothing.BUG=http://crbug.com/14478TEST=none -- just needs to compile and pass existing tests.DESIGN=<http://docs.google.com/Doc?id=dfhcnb2v_21gbtrcpr3&hl=en>
Review URL: http://codereview.chromium.org/126303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_service.cc')
-rw-r--r--net/proxy/proxy_service.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 1798421..43b7cfe 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -246,7 +246,9 @@ ProxyService* ProxyService::CreateNull() {
return new ProxyService(new ProxyConfigServiceNull, new ProxyResolverNull);
}
-int ProxyService::ResolveProxy(const GURL& raw_url, ProxyInfo* result,
+int ProxyService::ResolveProxy(LoadLog* load_log,
+ const GURL& raw_url,
+ ProxyInfo* result,
CompletionCallback* callback,
PacRequest** pac_request) {
DCHECK(callback);
@@ -403,7 +405,8 @@ void ProxyService::OnInitProxyResolverComplete(int result) {
ResumeAllPendingRequests();
}
-int ProxyService::ReconsiderProxyAfterError(const GURL& url,
+int ProxyService::ReconsiderProxyAfterError(LoadLog* load_log,
+ const GURL& url,
ProxyInfo* result,
CompletionCallback* callback,
PacRequest** pac_request) {
@@ -429,7 +432,7 @@ int ProxyService::ReconsiderProxyAfterError(const GURL& url,
// If we have a new config or the config was never tried, we delete the
// list of bad proxies and we try again.
proxy_retry_info_.clear();
- return ResolveProxy(url, result, callback, pac_request);
+ return ResolveProxy(load_log, url, result, callback, pac_request);
}
// We don't have new proxy settings to try, fallback to the next proxy
@@ -699,12 +702,13 @@ SyncProxyServiceHelper::SyncProxyServiceHelper(MessageLoop* io_message_loop,
DCHECK(io_message_loop_ != MessageLoop::current());
}
-int SyncProxyServiceHelper::ResolveProxy(const GURL& url,
+int SyncProxyServiceHelper::ResolveProxy(LoadLog* load_log,
+ const GURL& url,
ProxyInfo* proxy_info) {
DCHECK(io_message_loop_ != MessageLoop::current());
io_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
- this, &SyncProxyServiceHelper::StartAsyncResolve, url));
+ this, &SyncProxyServiceHelper::StartAsyncResolve, load_log, url));
event_.Wait();
@@ -714,12 +718,12 @@ int SyncProxyServiceHelper::ResolveProxy(const GURL& url,
return result_;
}
-int SyncProxyServiceHelper::ReconsiderProxyAfterError(const GURL& url,
- ProxyInfo* proxy_info) {
+int SyncProxyServiceHelper::ReconsiderProxyAfterError(
+ LoadLog* load_log, const GURL& url, ProxyInfo* proxy_info) {
DCHECK(io_message_loop_ != MessageLoop::current());
io_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
- this, &SyncProxyServiceHelper::StartAsyncReconsider, url));
+ this, &SyncProxyServiceHelper::StartAsyncReconsider, load_log, url));
event_.Wait();
@@ -729,16 +733,19 @@ int SyncProxyServiceHelper::ReconsiderProxyAfterError(const GURL& url,
return result_;
}
-void SyncProxyServiceHelper::StartAsyncResolve(const GURL& url) {
- result_ = proxy_service_->ResolveProxy(url, &proxy_info_, &callback_, NULL);
+void SyncProxyServiceHelper::StartAsyncResolve(LoadLog* load_log,
+ const GURL& url) {
+ result_ = proxy_service_->ResolveProxy(
+ load_log, url, &proxy_info_, &callback_, NULL);
if (result_ != net::ERR_IO_PENDING) {
OnCompletion(result_);
}
}
-void SyncProxyServiceHelper::StartAsyncReconsider(const GURL& url) {
+void SyncProxyServiceHelper::StartAsyncReconsider(LoadLog* load_log,
+ const GURL& url) {
result_ = proxy_service_->ReconsiderProxyAfterError(
- url, &proxy_info_, &callback_, NULL);
+ load_log, url, &proxy_info_, &callback_, NULL);
if (result_ != net::ERR_IO_PENDING) {
OnCompletion(result_);
}