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

Unified Diff: components/cronet/android/cronet_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: Created 5 years, 8 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: components/cronet/android/cronet_url_request_context_adapter.cc
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index ef4e9f5cf390cdf5548c2038e5643c5b0dd66c4e..a66bd04fe5331f3f1b9fc8344a403ded3e20bbc6 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -264,13 +264,14 @@ CronetURLRequestContextAdapter::GetNetworkTaskRunner() const {
void CronetURLRequestContextAdapter::StartNetLogToFile(JNIEnv* env,
jobject jcaller,
- jstring jfile_name) {
+ jstring jfile_name,
+ jboolean jlog_all) {
PostTaskToNetworkThread(
FROM_HERE,
base::Bind(
&CronetURLRequestContextAdapter::StartNetLogToFileOnNetworkThread,
base::Unretained(this),
- base::android::ConvertJavaStringToUTF8(env, jfile_name)));
+ base::android::ConvertJavaStringToUTF8(env, jfile_name), jlog_all));
}
void CronetURLRequestContextAdapter::StopNetLog(JNIEnv* env, jobject jcaller) {
@@ -281,7 +282,7 @@ void CronetURLRequestContextAdapter::StopNetLog(JNIEnv* env, jobject jcaller) {
}
void CronetURLRequestContextAdapter::StartNetLogToFileOnNetworkThread(
- const std::string& file_name) {
+ const std::string& file_name, bool log_all) {
DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread());
DCHECK(is_context_initialized_);
DCHECK(context_);
@@ -294,6 +295,8 @@ void CronetURLRequestContextAdapter::StartNetLogToFileOnNetworkThread(
return;
net_log_logger_.reset(new net::NetLogLogger());
+ if (log_all)
+ net_log_logger_->set_log_level(net::NetLog::LogLevel::LOG_ALL);
eroman 2015/04/17 21:35:10 Note that I am changing this to set_capture_mode()
kallasjoki 2015/05/06 13:58:56 Acknowledged.
net_log_logger_->StartObserving(context_->net_log(), file.Pass(), nullptr,
context_.get());
}

Powered by Google App Engine
This is Rietveld 408576698