Chromium Code Reviews| 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 3ee0c7ef263aee66b854d967645dfb2e49cbe596..b3792466802d8e00d2f99c8f8223a5c036cd5949 100644 |
| --- a/components/cronet/android/cronet_url_request_context_adapter.cc |
| +++ b/components/cronet/android/cronet_url_request_context_adapter.cc |
| @@ -271,13 +271,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) { |
| @@ -288,7 +289,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_); |
| @@ -301,6 +302,9 @@ void CronetURLRequestContextAdapter::StartNetLogToFileOnNetworkThread( |
| return; |
| write_to_file_observer_.reset(new net::WriteToFileNetLogObserver()); |
| + if (log_all) |
|
eroman
2015/05/06 17:34:19
nit: I suggest putting curlies around this
kallasjoki
2015/05/06 17:47:07
Done.
|
| + write_to_file_observer_->set_capture_mode( |
| + net::NetLogCaptureMode::IncludeSocketBytes()); |
| write_to_file_observer_->StartObserving(context_->net_log(), file.Pass(), |
| nullptr, context_.get()); |
| } |