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

Unified Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 557733002: [Android WebView] Use NetLog for providing full request headers to DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved NetLog creation to AwURLRequestContextGetter constructor Created 6 years, 3 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: android_webview/browser/net/aw_url_request_context_getter.cc
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index 6e39cd79cce587003a430172276bbcd81324d69c..2e7d41240cbd03616d3801a7357627405e9c32b5 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -27,6 +27,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "net/base/cache_type.h"
+#include "net/base/net_log.h"
#include "net/cookies/cookie_store.h"
#include "net/dns/mapped_host_resolver.h"
#include "net/http/http_cache.h"
@@ -175,7 +176,8 @@ AwURLRequestContextGetter::AwURLRequestContextGetter(
scoped_ptr<data_reduction_proxy::DataReductionProxyConfigService>
config_service)
: partition_path_(partition_path),
- cookie_store_(cookie_store) {
+ cookie_store_(cookie_store),
+ net_log_(new net::NetLog()) {
data_reduction_proxy_config_service_ = config_service.Pass();
// CreateSystemProxyConfigService for Android must be called on main thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -205,6 +207,7 @@ void AwURLRequestContextGetter::InitializeURLRequestContext() {
}
builder.set_accept_language(net::HttpUtil::GenerateAcceptLanguageHeader(
AwContentBrowserClient::GetAcceptLangsImpl()));
+ builder.set_net_log(net_log_.get());
ApplyCmdlineOverridesToURLRequestContextBuilder(&builder);
url_request_context_.reset(builder.Build());
@@ -276,4 +279,8 @@ AwURLRequestContextGetter::GetDataReductionProxyAuthRequestHandler() const {
return data_reduction_proxy_auth_request_handler_.get();
}
+net::NetLog* AwURLRequestContextGetter::GetNetLog() {
+ return net_log_.get();
+}
+
} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698