| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 const std::string model_type = ModelTypeToString(static_cast<ModelType>(i)); | 96 const std::string model_type = ModelTypeToString(static_cast<ModelType>(i)); |
| 97 counter_entries->Set(model_type, type_entries.release()); | 97 counter_entries->Set(model_type, type_entries.release()); |
| 98 } | 98 } |
| 99 value->Set("counter_entries", counter_entries.Pass()); | 99 value->Set("counter_entries", counter_entries.Pass()); |
| 100 return value; | 100 return value; |
| 101 } | 101 } |
| 102 | 102 |
| 103 std::string SyncSessionSnapshot::ToString() const { | 103 std::string SyncSessionSnapshot::ToString() const { |
| 104 std::string json; | 104 std::string json; |
| 105 base::JSONWriter::WriteWithOptions( | 105 base::JSONWriter::WriteWithOptions( |
| 106 ToValue().get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json); | 106 *ToValue(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json); |
| 107 return json; | 107 return json; |
| 108 } | 108 } |
| 109 | 109 |
| 110 const ProgressMarkerMap& | 110 const ProgressMarkerMap& |
| 111 SyncSessionSnapshot::download_progress_markers() const { | 111 SyncSessionSnapshot::download_progress_markers() const { |
| 112 return download_progress_markers_; | 112 return download_progress_markers_; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool SyncSessionSnapshot::is_silenced() const { | 115 bool SyncSessionSnapshot::is_silenced() const { |
| 116 return is_silenced_; | 116 return is_silenced_; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return num_to_delete_entries_by_type_; | 153 return num_to_delete_entries_by_type_; |
| 154 } | 154 } |
| 155 | 155 |
| 156 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource | 156 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource |
| 157 SyncSessionSnapshot::legacy_updates_source() const { | 157 SyncSessionSnapshot::legacy_updates_source() const { |
| 158 return legacy_updates_source_; | 158 return legacy_updates_source_; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace sessions | 161 } // namespace sessions |
| 162 } // namespace syncer | 162 } // namespace syncer |
| OLD | NEW |