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

Side by Side Diff: base/trace_event/trace_event_system_stats_monitor.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 | « base/trace_event/trace_event_argument.cc ('k') | base/values.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 "base/trace_event/trace_event_system_stats_monitor.h" 5 #include "base/trace_event/trace_event_system_stats_monitor.h"
6 6
7 #include "base/debug/leak_annotations.h" 7 #include "base/debug/leak_annotations.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 dump_timer_.Stop(); 118 dump_timer_.Stop();
119 } 119 }
120 120
121 bool TraceEventSystemStatsMonitor::IsTimerRunningForTest() const { 121 bool TraceEventSystemStatsMonitor::IsTimerRunningForTest() const {
122 return dump_timer_.IsRunning(); 122 return dump_timer_.IsRunning();
123 } 123 }
124 124
125 void AppendSystemProfileAsTraceFormat(const SystemMetrics& system_metrics, 125 void AppendSystemProfileAsTraceFormat(const SystemMetrics& system_metrics,
126 std::string* output) { 126 std::string* output) {
127 std::string tmp; 127 std::string tmp;
128 base::JSONWriter::Write(system_metrics.ToValue().get(), &tmp); 128 base::JSONWriter::Write(*system_metrics.ToValue(), &tmp);
129 *output += tmp; 129 *output += tmp;
130 } 130 }
131 131
132 } // namespace trace_event 132 } // namespace trace_event
133 } // namespace base 133 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_argument.cc ('k') | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698