Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/net/net_log_logger.h" | 5 #include "chrome/browser/net/net_log_logger.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 | 9 |
| 10 NetLogLogger::NetLogLogger() : Observer(net::NetLog::LOG_ALL_BUT_BYTES) {} | 10 NetLogLogger::NetLogLogger() : Observer(net::NetLog::LOG_ALL_BUT_BYTES) {} |
| 11 | 11 |
| 12 NetLogLogger::~NetLogLogger() {} | 12 NetLogLogger::~NetLogLogger() {} |
| 13 | 13 |
| 14 void NetLogLogger::OnAddEntry(net::NetLog::EventType type, | 14 void NetLogLogger::OnAddEntry(net::NetLog::EventType type, |
| 15 const base::TimeTicks& time, | 15 const base::TimeTicks& time, |
| 16 const net::NetLog::Source& source, | 16 const net::NetLog::Source& source, |
| 17 net::NetLog::EventPhase phase, | 17 net::NetLog::EventPhase phase, |
| 18 net::NetLog::EventParameters* params) { | 18 net::NetLog::EventParameters* params) { |
| 19 scoped_ptr<Value> value(net::NetLog::EntryToDictionaryValue(type, time, | 19 scoped_ptr<Value> value(net::NetLog::EntryToDictionaryValue(type, time, |
| 20 source, phase, | 20 source, phase, |
| 21 params, true)); | 21 params, true)); |
| 22 std::string json; | 22 std::string json; |
| 23 base::JSONWriter::Write(value.get(), true, &json); | 23 base::JSONWriter::Write(value.get(), true, &json); |
| 24 VLOG(1) << json; | 24 LOG(INFO) << json; |
|
eroman
2010/11/16 17:51:14
Is this change intentional?
mmenke
2010/11/16 21:34:49
No. Had been thinking of it (Though not with this
| |
| 25 } | 25 } |
| 26 | 26 |
| OLD | NEW |