From 451dd038660176b76f2198c956f8988a0b22ccda Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 7 Sep 2015 22:44:13 +0530 Subject: [PATCH] create net log file after context is created --- brightray/browser/net_log.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/brightray/browser/net_log.cc b/brightray/browser/net_log.cc index 594474363561..7d781a22e7b7 100644 --- a/brightray/browser/net_log.cc +++ b/brightray/browser/net_log.cc @@ -30,6 +30,12 @@ scoped_ptr GetConstants() { } // namespace NetLog::NetLog() { +} + +NetLog::~NetLog() { +} + +void NetLog::StartLogging(net::URLRequestContext* url_request_context) { auto command_line = base::CommandLine::ForCurrentProcess(); if (!command_line->HasSwitch(switches::kLogNetLog)) return; @@ -46,17 +52,12 @@ NetLog::NetLog() { << "for net logging"; return; } -} - -NetLog::~NetLog() { -} - -void NetLog::StartLogging(net::URLRequestContext* url_request_context) { - if (!log_file_) - return; scoped_ptr constants(GetConstants()); - write_to_file_observer_.StartObserving(this, log_file_.Pass(), constants.get(), url_request_context); + write_to_file_observer_.StartObserving(this, + log_file_.Pass(), + constants.get(), + url_request_context); } } // namespace brightray