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

Side by Side Diff: sync/internal_api/public/sessions/sync_session_snapshot.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 | « sync/internal_api/public/engine/model_safe_worker.cc ('k') | sync/js/js_event_details.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/internal_api/public/sessions/sync_session_snapshot.h" 5 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "sync/protocol/proto_enum_conversions.h" 10 #include "sync/protocol/proto_enum_conversions.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const std::string model_type = ModelTypeToString(static_cast<ModelType>(i)); 98 const std::string model_type = ModelTypeToString(static_cast<ModelType>(i));
99 counter_entries->Set(model_type, type_entries.release()); 99 counter_entries->Set(model_type, type_entries.release());
100 } 100 }
101 value->Set("counter_entries", counter_entries.Pass()); 101 value->Set("counter_entries", counter_entries.Pass());
102 return value; 102 return value;
103 } 103 }
104 104
105 std::string SyncSessionSnapshot::ToString() const { 105 std::string SyncSessionSnapshot::ToString() const {
106 std::string json; 106 std::string json;
107 base::JSONWriter::WriteWithOptions( 107 base::JSONWriter::WriteWithOptions(
108 ToValue().get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json); 108 *ToValue(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json);
109 return json; 109 return json;
110 } 110 }
111 111
112 const ProgressMarkerMap& 112 const ProgressMarkerMap&
113 SyncSessionSnapshot::download_progress_markers() const { 113 SyncSessionSnapshot::download_progress_markers() const {
114 return download_progress_markers_; 114 return download_progress_markers_;
115 } 115 }
116 116
117 bool SyncSessionSnapshot::is_silenced() const { 117 bool SyncSessionSnapshot::is_silenced() const {
118 return is_silenced_; 118 return is_silenced_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 return num_to_delete_entries_by_type_; 159 return num_to_delete_entries_by_type_;
160 } 160 }
161 161
162 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource 162 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource
163 SyncSessionSnapshot::legacy_updates_source() const { 163 SyncSessionSnapshot::legacy_updates_source() const {
164 return legacy_updates_source_; 164 return legacy_updates_source_;
165 } 165 }
166 166
167 } // namespace sessions 167 } // namespace sessions
168 } // namespace syncer 168 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/engine/model_safe_worker.cc ('k') | sync/js/js_event_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698