| 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..97f22b8472bdee8edfd9da536cb2dae503cd6c3c 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,19 +281,19 @@ 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() {
|
| DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread());
|
| if (net_log_logger_) {
|
| - net_log_logger_->StopObserving();
|
| + net_log_logger_->StopObserving(context_.get());
|
| net_log_logger_.reset();
|
| }
|
| }
|
|
|