OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |