From 10223577008510eececdc30b6b9f8f025a7b5c36 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Sat, 6 Jun 2015 00:13:10 +0530 Subject: [PATCH] adding netconstants to log --- brightray/browser/net_log.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/brightray/browser/net_log.cc b/brightray/browser/net_log.cc index 4090b9c108..d0aa4abd21 100644 --- a/brightray/browser/net_log.cc +++ b/brightray/browser/net_log.cc @@ -34,7 +34,11 @@ NetLog::NetLog(net::URLRequestContext* context) LOG(ERROR) << "Could not open file: " << log_path.value() << "for net logging"; - fprintf(log_file_.get(), "{\"events\": [\n"); + std::string json; + scoped_ptr constants = net::GetNetConstants(); + base::JSONWriter::Write(constants.release(), &json); + fprintf(log_file_.get(), "{\"constants\": %s, \n", json.c_str()); + fprintf(log_file_.get(), "\"events\": [\n"); if (context_.get()) { DCHECK(context_->CalledOnValidThread());