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

Side by Side Diff: remoting/base/vlog_net_log.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « printing/printed_document.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/base/vlog_net_log.h" 5 #include "remoting/base/vlog_net_log.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 17 matching lines...) Expand all
28 VlogNetLog::Observer::Observer() { 28 VlogNetLog::Observer::Observer() {
29 } 29 }
30 30
31 VlogNetLog::Observer::~Observer() { 31 VlogNetLog::Observer::~Observer() {
32 } 32 }
33 33
34 void VlogNetLog::Observer::OnAddEntry(const net::NetLog::Entry& entry) { 34 void VlogNetLog::Observer::OnAddEntry(const net::NetLog::Entry& entry) {
35 if (VLOG_IS_ON(4)) { 35 if (VLOG_IS_ON(4)) {
36 scoped_ptr<base::Value> value(entry.ToValue()); 36 scoped_ptr<base::Value> value(entry.ToValue());
37 std::string json; 37 std::string json;
38 base::JSONWriter::Write(value.get(), &json); 38 base::JSONWriter::Write(*value, &json);
39 VLOG(4) << json; 39 VLOG(4) << json;
40 } 40 }
41 } 41 }
42 42
43 VlogNetLog::VlogNetLog() 43 VlogNetLog::VlogNetLog()
44 : observer_(new Observer()) { 44 : observer_(new Observer()) {
45 DeprecatedAddObserver(observer_.get(), 45 DeprecatedAddObserver(observer_.get(),
46 net::NetLogCaptureMode::IncludeCookiesAndCredentials()); 46 net::NetLogCaptureMode::IncludeCookiesAndCredentials());
47 } 47 }
48 48
49 VlogNetLog::~VlogNetLog() { 49 VlogNetLog::~VlogNetLog() {
50 DeprecatedRemoveObserver(observer_.get()); 50 DeprecatedRemoveObserver(observer_.get());
51 } 51 }
52 52
53 } // namespace remoting 53 } // namespace remoting
OLDNEW
« no previous file with comments | « printing/printed_document.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698