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

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: use cast_net_log 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
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..d30ffd93212257c460e5d627426fb8846d08b253 100644
--- a/chromecast/browser/url_request_context_factory.cc
+++ b/chromecast/browser/url_request_context_factory.cc
@@ -10,6 +10,7 @@
#include "base/threading/worker_pool.h"
#include "chromecast/base/chromecast_switches.h"
#include "chromecast/browser/cast_http_user_agent_settings.h"
+#include "chromecast/browser/cast_net_log.h"
#include "chromecast/browser/cast_network_delegate.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -137,7 +138,8 @@ URLRequestContextFactory::URLRequestContextFactory()
system_network_delegate_(CastNetworkDelegate::Create()),
system_dependencies_initialized_(false),
main_dependencies_initialized_(false),
- media_dependencies_initialized_(false) {
+ media_dependencies_initialized_(false),
+ net_log_(new CastNetLog()) {
}
URLRequestContextFactory::~URLRequestContextFactory() {
@@ -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_.get());
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_.get());
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_.get());
return main_context;
}

Powered by Google App Engine
This is Rietveld 408576698