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

Unified Diff: chromecast/browser/url_request_context_factory.cc

Issue 1216443002: [Chromecast] Add net logging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « chromecast/browser/url_request_context_factory.h ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/url_request_context_factory.cc
diff --git a/chromecast/browser/url_request_context_factory.cc b/chromecast/browser/url_request_context_factory.cc
index 2c389a98f021d3f662d2c98964d94d4f54d086a8..693a220f3bc0bace31141e6f44d88ff0d73362f9 100644
--- a/chromecast/browser/url_request_context_factory.cc
+++ b/chromecast/browser/url_request_context_factory.cc
@@ -143,7 +143,7 @@ URLRequestContextFactory::URLRequestContextFactory()
URLRequestContextFactory::~URLRequestContextFactory() {
}
-void URLRequestContextFactory::InitializeOnUIThread() {
+void URLRequestContextFactory::InitializeOnUIThread(net::NetLog* net_log) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// Cast http user agent settings must be initialized in UI thread
// because it registers itself to pref notification observer which is not
@@ -157,6 +157,8 @@ void URLRequestContextFactory::InitializeOnUIThread() {
content::BrowserThread::IO),
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::FILE)));
+
+ net_log_ = net_log;
}
net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter(
@@ -328,6 +330,7 @@ net::URLRequestContext* URLRequestContextFactory::CreateSystemRequestContext() {
system_context->set_cookie_store(
content::CreateCookieStore(content::CookieStoreConfig()));
system_context->set_network_delegate(system_network_delegate_.get());
+ system_context->set_net_log(net_log_);
return system_context;
}
@@ -347,6 +350,7 @@ net::URLRequestContext* URLRequestContextFactory::CreateMediaRequestContext() {
media_context->CopyFrom(main_context);
media_context->set_http_transaction_factory(
media_transaction_factory_.get());
+ media_context->set_net_log(net_log_);
return media_context;
}
@@ -399,6 +403,7 @@ net::URLRequestContext* URLRequestContextFactory::CreateMainRequestContext(
main_transaction_factory_.get());
main_context->set_job_factory(main_job_factory_.get());
main_context->set_network_delegate(app_network_delegate_.get());
+ main_context->set_net_log(net_log_);
return main_context;
}
« no previous file with comments | « chromecast/browser/url_request_context_factory.h ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698