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

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

Issue 976483002: Add ability for NetLogLogger to gather data from more than just NetLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 5 years, 10 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/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 00daf654752fdce46f6342fee84aaef1d74d82ed..8e5ed79c93593d7451889cb44dc1f8d3b16b1d4c 100644
--- a/components/cronet/android/url_request_context_adapter.cc
+++ b/components/cronet/android/url_request_context_adapter.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/files/file_util.h"
+#include "base/files/scoped_file.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
#include "components/cronet/url_request_context_config.h"
@@ -280,13 +281,13 @@ void URLRequestContextAdapter::StartNetLogToFileHelper(
return;
base::FilePath file_path(file_name);
- FILE* file = base::OpenFile(file_path, "w");
+ base::ScopedFILE file(base::OpenFile(file_path, "w"));
if (!file)
return;
- scoped_ptr<base::Value> constants(net::NetLogLogger::GetConstants());
- net_log_logger_.reset(new net::NetLogLogger(file, *constants));
- net_log_logger_->StartObserving(context_->net_log());
+ net_log_logger_.reset(new net::NetLogLogger());
+ net_log_logger_->StartObserving(context_->net_log(), file.Pass(), nullptr,
+ context_.get());
}
void URLRequestContextAdapter::StopNetLogHelper() {

Powered by Google App Engine
This is Rietveld 408576698