Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1562)

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 2650773004: Add resolved proxy for the http stream job to net log (Closed)
Patch Set: rch comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/log/net_log_event_type_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index ca3652e917a6a663341d6c9a6d43b1ceea95e0f1..7b5dbe8738193cf153b9509d5404573875af82ce 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -145,6 +145,18 @@ std::unique_ptr<base::Value> NetLogHttpStreamProtoCallback(
return std::move(dict);
}
+// Returns parameters associated with the proxy resolution.
+std::unique_ptr<base::Value> NetLogHttpStreamJobProxyServerResolved(
+ const ProxyServer& proxy_server,
+ NetLogCaptureMode /* capture_mode */) {
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+
+ dict->SetString("proxy_server", proxy_server.is_valid()
+ ? proxy_server.ToPacString()
+ : std::string());
+ return std::move(dict);
+}
+
HttpStreamFactoryImpl::Job::Job(Delegate* delegate,
JobType job_type,
HttpNetworkSession* session,
@@ -739,6 +751,12 @@ int HttpStreamFactoryImpl::Job::DoResolveProxy() {
int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) {
pac_request_ = NULL;
+ net_log_.AddEvent(
+ NetLogEventType::HTTP_STREAM_JOB_PROXY_SERVER_RESOLVED,
+ base::Bind(
+ &NetLogHttpStreamJobProxyServerResolved,
+ proxy_info_.is_empty() ? ProxyServer() : proxy_info_.proxy_server()));
+
if (result == OK) {
// Remove unsupported proxies from the list.
int supported_proxies =
« no previous file with comments | « no previous file | net/log/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698