Index: net/proxy/proxy_service.cc |
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc |
index 9f7484c8f5169b481949e772ab080f2d80222acd..5ed56d1fec306ef09de4666d43f47288f9be08f8 100644 |
--- a/net/proxy/proxy_service.cc |
+++ b/net/proxy/proxy_service.cc |
@@ -28,6 +28,7 @@ |
#include "net/base/proxy_delegate.h" |
#include "net/base/url_util.h" |
#include "net/log/net_log.h" |
+#include "net/log/net_log_event_type.h" |
#include "net/proxy/dhcp_proxy_script_fetcher.h" |
#include "net/proxy/multi_threaded_proxy_resolver.h" |
#include "net/proxy/proxy_config_service_fixed.h" |
@@ -845,7 +846,7 @@ class ProxyService::PacRequest |
} |
void Cancel() { |
- net_log_.AddEvent(NetLog::TYPE_CANCELLED); |
+ net_log_.AddEvent(NetLogEventType::CANCELLED); |
if (is_started()) |
CancelResolveJob(); |
@@ -855,7 +856,7 @@ class ProxyService::PacRequest |
user_callback_.Reset(); |
results_ = NULL; |
- net_log_.EndEvent(NetLog::TYPE_PROXY_SERVICE); |
+ net_log_.EndEvent(NetLogEventType::PROXY_SERVICE); |
} |
// Returns true if Cancel() has been called. |
@@ -1054,7 +1055,7 @@ int ProxyService::ResolveProxyHelper(const GURL& raw_url, |
const BoundNetLog& net_log) { |
DCHECK(CalledOnValidThread()); |
- net_log.BeginEvent(NetLog::TYPE_PROXY_SERVICE); |
+ net_log.BeginEvent(NetLogEventType::PROXY_SERVICE); |
// Notify our polling-based dependencies that a resolve is taking place. |
// This way they can schedule their polls in response to network activity. |
@@ -1093,7 +1094,8 @@ int ProxyService::ResolveProxyHelper(const GURL& raw_url, |
if (rv != ERR_IO_PENDING) |
return req->QueryDidComplete(rv); |
} else { |
- req->net_log()->BeginEvent(NetLog::TYPE_PROXY_SERVICE_WAITING_FOR_INIT_PAC); |
+ req->net_log()->BeginEvent( |
+ NetLogEventType::PROXY_SERVICE_WAITING_FOR_INIT_PAC); |
} |
DCHECK_EQ(ERR_IO_PENDING, rv); |
@@ -1166,7 +1168,7 @@ void ProxyService::SuspendAllPendingRequests() { |
req->CancelResolveJob(); |
req->net_log()->BeginEvent( |
- NetLog::TYPE_PROXY_SERVICE_WAITING_FOR_INIT_PAC); |
+ NetLogEventType::PROXY_SERVICE_WAITING_FOR_INIT_PAC); |
} |
} |
} |
@@ -1185,7 +1187,8 @@ void ProxyService::SetReady() { |
++it) { |
PacRequest* req = it->get(); |
if (!req->is_started() && !req->was_cancelled()) { |
- req->net_log()->EndEvent(NetLog::TYPE_PROXY_SERVICE_WAITING_FOR_INIT_PAC); |
+ req->net_log()->EndEvent( |
+ NetLogEventType::PROXY_SERVICE_WAITING_FOR_INIT_PAC); |
// Note that we re-check for synchronous completion, in case we are |
// no longer using a ProxyResolver (can happen if we fell-back to manual). |
@@ -1344,7 +1347,7 @@ void ProxyService::ReportSuccess(const ProxyInfo& result, |
} |
if (net_log_) { |
net_log_->AddGlobalEntry( |
- NetLog::TYPE_BAD_PROXY_LIST_REPORTED, |
+ NetLogEventType::BAD_PROXY_LIST_REPORTED, |
base::Bind(&NetLogBadProxyListCallback, &new_retry_info)); |
} |
} |
@@ -1410,7 +1413,7 @@ int ProxyService::DidFinishResolvingProxy(const GURL& url, |
if (proxy_delegate) |
proxy_delegate->OnResolveProxy(url, method, *this, result); |
- net_log.AddEvent(NetLog::TYPE_PROXY_SERVICE_RESOLVED_PROXY_LIST, |
+ net_log.AddEvent(NetLogEventType::PROXY_SERVICE_RESOLVED_PROXY_LIST, |
base::Bind(&NetLogFinishedResolvingProxyCallback, result)); |
// This check is done to only log the NetLog event when necessary, it's |
@@ -1418,12 +1421,12 @@ int ProxyService::DidFinishResolvingProxy(const GURL& url, |
if (!proxy_retry_info_.empty()) { |
result->DeprioritizeBadProxies(proxy_retry_info_); |
net_log.AddEvent( |
- NetLog::TYPE_PROXY_SERVICE_DEPRIORITIZED_BAD_PROXIES, |
+ NetLogEventType::PROXY_SERVICE_DEPRIORITIZED_BAD_PROXIES, |
base::Bind(&NetLogFinishedResolvingProxyCallback, result)); |
} |
} else { |
net_log.AddEventWithNetErrorCode( |
- NetLog::TYPE_PROXY_SERVICE_RESOLVED_PROXY_LIST, result_code); |
+ NetLogEventType::PROXY_SERVICE_RESOLVED_PROXY_LIST, result_code); |
bool reset_config = result_code == ERR_PAC_SCRIPT_TERMINATED; |
if (!config_.pac_mandatory()) { |
@@ -1454,7 +1457,7 @@ int ProxyService::DidFinishResolvingProxy(const GURL& url, |
} |
} |
- net_log.EndEvent(NetLog::TYPE_PROXY_SERVICE); |
+ net_log.EndEvent(NetLogEventType::PROXY_SERVICE); |
return result_code; |
} |
@@ -1593,7 +1596,7 @@ void ProxyService::OnProxyConfigChanged( |
// Emit the proxy settings change to the NetLog stream. |
if (net_log_) { |
- net_log_->AddGlobalEntry(NetLog::TYPE_PROXY_CONFIG_CHANGED, |
+ net_log_->AddGlobalEntry(NetLogEventType::PROXY_CONFIG_CHANGED, |
base::Bind(&NetLogProxyConfigChangedCallback, |
&fetched_config_, &effective_config)); |
} |