| Index: net/proxy/proxy_resolver_factory_mojo.cc
|
| diff --git a/net/proxy/proxy_resolver_factory_mojo.cc b/net/proxy/proxy_resolver_factory_mojo.cc
|
| index 57504f0c75f8b9fcf30fe7167a1c6e0474bba247..ee3fa4c8276f2dd9436b10b248f952e9aa20ff36 100644
|
| --- a/net/proxy/proxy_resolver_factory_mojo.cc
|
| +++ b/net/proxy/proxy_resolver_factory_mojo.cc
|
| @@ -51,17 +51,18 @@ class ClientMixin : public ClientInterface {
|
| ClientMixin(HostResolver* host_resolver,
|
| ProxyResolverErrorObserver* error_observer,
|
| NetLog* net_log,
|
| - const BoundNetLog& bound_net_log)
|
| - : host_resolver_(host_resolver, bound_net_log),
|
| + const NetLogWithSource& net_log_with_source)
|
| + : host_resolver_(host_resolver, net_log_with_source),
|
| error_observer_(error_observer),
|
| net_log_(net_log),
|
| - bound_net_log_(bound_net_log) {}
|
| + net_log_with_source_(net_log_with_source) {}
|
|
|
| // Overridden from ClientInterface:
|
| void Alert(const mojo::String& message) override {
|
| base::string16 message_str = message.To<base::string16>();
|
| auto callback = NetLog::StringCallback("message", &message_str);
|
| - bound_net_log_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ALERT, callback);
|
| + net_log_with_source_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ALERT,
|
| + callback);
|
| if (net_log_)
|
| net_log_->AddGlobalEntry(NetLogEventType::PAC_JAVASCRIPT_ALERT, callback);
|
| }
|
| @@ -69,7 +70,8 @@ class ClientMixin : public ClientInterface {
|
| void OnError(int32_t line_number, const mojo::String& message) override {
|
| base::string16 message_str = message.To<base::string16>();
|
| auto callback = base::Bind(&NetLogErrorCallback, line_number, &message_str);
|
| - bound_net_log_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ERROR, callback);
|
| + net_log_with_source_.AddEvent(NetLogEventType::PAC_JAVASCRIPT_ERROR,
|
| + callback);
|
| if (net_log_)
|
| net_log_->AddGlobalEntry(NetLogEventType::PAC_JAVASCRIPT_ERROR, callback);
|
| if (error_observer_)
|
| @@ -90,7 +92,7 @@ class ClientMixin : public ClientInterface {
|
| MojoHostResolverImpl host_resolver_;
|
| ProxyResolverErrorObserver* const error_observer_;
|
| NetLog* const net_log_;
|
| - const BoundNetLog bound_net_log_;
|
| + const NetLogWithSource net_log_with_source_;
|
| };
|
|
|
| // Implementation of ProxyResolver that connects to a Mojo service to evaluate
|
| @@ -120,7 +122,7 @@ class ProxyResolverMojo : public ProxyResolver {
|
| ProxyInfo* results,
|
| const net::CompletionCallback& callback,
|
| RequestHandle* request,
|
| - const BoundNetLog& net_log) override;
|
| + const NetLogWithSource& net_log) override;
|
| void CancelRequest(RequestHandle request) override;
|
| LoadState GetLoadState(RequestHandle request) const override;
|
|
|
| @@ -157,7 +159,7 @@ class ProxyResolverMojo::Job
|
| const GURL& url,
|
| ProxyInfo* results,
|
| const CompletionCallback& callback,
|
| - const BoundNetLog& net_log);
|
| + const NetLogWithSource& net_log);
|
| ~Job() override;
|
|
|
| // Cancels the job and prevents the callback from being run.
|
| @@ -188,7 +190,7 @@ ProxyResolverMojo::Job::Job(ProxyResolverMojo* resolver,
|
| const GURL& url,
|
| ProxyInfo* results,
|
| const CompletionCallback& callback,
|
| - const BoundNetLog& net_log)
|
| + const NetLogWithSource& net_log)
|
| : ClientMixin<interfaces::ProxyResolverRequestClient>(
|
| resolver->host_resolver_,
|
| resolver->error_observer_.get(),
|
| @@ -285,7 +287,7 @@ int ProxyResolverMojo::GetProxyForURL(const GURL& url,
|
| ProxyInfo* results,
|
| const CompletionCallback& callback,
|
| RequestHandle* request,
|
| - const BoundNetLog& net_log) {
|
| + const NetLogWithSource& net_log) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| if (!mojo_proxy_resolver_ptr_)
|
| @@ -319,7 +321,7 @@ LoadState ProxyResolverMojo::GetLoadState(RequestHandle request) const {
|
| //
|
| // Note: a Job instance is not tied to a particular resolve request, and hence
|
| // there is no per-request logging to be done (any netlog events are only sent
|
| -// globally) so this always uses an empty BoundNetLog.
|
| +// globally) so this always uses an empty NetLogWithSource.
|
| class ProxyResolverFactoryMojo::Job
|
| : public ClientMixin<interfaces::ProxyResolverFactoryRequestClient>,
|
| public ProxyResolverFactory::Request {
|
| @@ -333,7 +335,7 @@ class ProxyResolverFactoryMojo::Job
|
| factory->host_resolver_,
|
| error_observer.get(),
|
| factory->net_log_,
|
| - BoundNetLog()),
|
| + NetLogWithSource()),
|
| factory_(factory),
|
| resolver_(resolver),
|
| callback_(callback),
|
|
|