diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 19:16:43 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 19:16:43 +0000 |
commit | d7fd17806126d4998ea0ac36eac95ea031761219 (patch) | |
tree | 363a1689a60dcf968281827d2128eb3546c7c605 /net/proxy/init_proxy_resolver.cc | |
parent | 243b4f0b3c3aa4e48064ae01337ba2554d367074 (diff) | |
download | chromium_src-d7fd17806126d4998ea0ac36eac95ea031761219.zip chromium_src-d7fd17806126d4998ea0ac36eac95ea031761219.tar.gz chromium_src-d7fd17806126d4998ea0ac36eac95ea031761219.tar.bz2 |
NetLog: Log net error codes on a lot of EndEvents.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6349083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/init_proxy_resolver.cc')
-rw-r--r-- | net/proxy/init_proxy_resolver.cc | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/net/proxy/init_proxy_resolver.cc b/net/proxy/init_proxy_resolver.cc index 4bf250e..c60dd21 100644 --- a/net/proxy/init_proxy_resolver.cc +++ b/net/proxy/init_proxy_resolver.cc @@ -151,8 +151,10 @@ int InitProxyResolver::DoWait() { int InitProxyResolver::DoWaitComplete(int result) { DCHECK_EQ(OK, result); - if (wait_delay_.ToInternalValue() != 0) - net_log_.EndEvent(NetLog::TYPE_INIT_PROXY_RESOLVER_WAIT, NULL); + if (wait_delay_.ToInternalValue() != 0) { + net_log_.EndEventWithNetErrorCode(NetLog::TYPE_INIT_PROXY_RESOLVER_WAIT, + result); + } next_state_ = GetStartState(); return OK; } @@ -185,14 +187,10 @@ int InitProxyResolver::DoFetchPacScript() { int InitProxyResolver::DoFetchPacScriptComplete(int result) { DCHECK(resolver_->expects_pac_bytes()); - if (result == OK) { - net_log_.EndEvent(NetLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, NULL); - } else { - net_log_.EndEvent( - NetLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, - make_scoped_refptr(new NetLogIntegerParameter("net_error", result))); + net_log_.EndEventWithNetErrorCode( + NetLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, result); + if (result != OK) return TryToFallbackPacUrl(result); - } next_state_ = STATE_SET_PAC_SCRIPT; return result; @@ -219,12 +217,10 @@ int InitProxyResolver::DoSetPacScript() { } int InitProxyResolver::DoSetPacScriptComplete(int result) { - if (result != OK) { - net_log_.EndEvent( - NetLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, - make_scoped_refptr(new NetLogIntegerParameter("net_error", result))); + net_log_.EndEventWithNetErrorCode( + NetLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, result); + if (result != OK) return TryToFallbackPacUrl(result); - } // Let the caller know which automatic setting we ended up initializing the // resolver for (there may have been multiple fallbacks to choose from.) @@ -240,7 +236,6 @@ int InitProxyResolver::DoSetPacScriptComplete(int result) { } } - net_log_.EndEvent(NetLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, NULL); return result; } |