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

Unified Diff: components/cronet/android/url_request_context_adapter.cc

Issue 1093793002: Allow setting Cronet NetLog level to LOG_ALL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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 | « components/cronet/android/url_request_context_adapter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/url_request_context_adapter.cc
diff --git a/components/cronet/android/url_request_context_adapter.cc b/components/cronet/android/url_request_context_adapter.cc
index 1524bafbae5d2fb4002e4dba88d18874415b128e..fd262c2ca6bac34b9480ddf32caf266818e5af58 100644
--- a/components/cronet/android/url_request_context_adapter.cc
+++ b/components/cronet/android/url_request_context_adapter.cc
@@ -269,11 +269,12 @@ URLRequestContextAdapter::GetNetworkTaskRunner() const {
return network_thread_->message_loop_proxy();
}
-void URLRequestContextAdapter::StartNetLogToFile(const std::string& file_name) {
+void URLRequestContextAdapter::StartNetLogToFile(const std::string& file_name,
+ bool log_all) {
PostTaskToNetworkThread(
FROM_HERE,
- base::Bind(
- &URLRequestContextAdapter::StartNetLogToFileHelper, this, file_name));
+ base::Bind(&URLRequestContextAdapter::StartNetLogToFileHelper, this,
+ file_name, log_all));
}
void URLRequestContextAdapter::StopNetLog() {
@@ -282,7 +283,7 @@ void URLRequestContextAdapter::StopNetLog() {
}
void URLRequestContextAdapter::StartNetLogToFileHelper(
- const std::string& file_name) {
+ const std::string& file_name, bool log_all) {
DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread());
// Do nothing if already logging to a file.
if (write_to_file_observer_)
@@ -294,6 +295,10 @@ void URLRequestContextAdapter::StartNetLogToFileHelper(
return;
write_to_file_observer_.reset(new net::WriteToFileNetLogObserver());
+ if (log_all) {
+ write_to_file_observer_->set_capture_mode(
+ net::NetLogCaptureMode::IncludeSocketBytes());
+ }
write_to_file_observer_->StartObserving(context_->net_log(), file.Pass(),
nullptr, context_.get());
}
« no previous file with comments | « components/cronet/android/url_request_context_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698