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

Side by Side Diff: components/sync/engine/cycle/sync_cycle_snapshot.cc

Issue 2374223003: Sync MDP: reimplement value conversions ontop of visitors
Patch Set: Created 4 years, 2 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
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 "components/sync/engine/cycle/sync_cycle_snapshot.h" 5 #include "components/sync/engine/cycle/sync_cycle_snapshot.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 value->SetInteger("numServerOverwrites", 78 value->SetInteger("numServerOverwrites",
79 model_neutral_state_.num_server_overwrites); 79 model_neutral_state_.num_server_overwrites);
80 value->Set("downloadProgressMarkers", 80 value->Set("downloadProgressMarkers",
81 ProgressMarkerMapToValue(download_progress_markers_)); 81 ProgressMarkerMapToValue(download_progress_markers_));
82 value->SetBoolean("isSilenced", is_silenced_); 82 value->SetBoolean("isSilenced", is_silenced_);
83 // We don't care too much if we lose precision here, also. 83 // We don't care too much if we lose precision here, also.
84 value->SetInteger("numEncryptionConflicts", num_encryption_conflicts_); 84 value->SetInteger("numEncryptionConflicts", num_encryption_conflicts_);
85 value->SetInteger("numHierarchyConflicts", num_hierarchy_conflicts_); 85 value->SetInteger("numHierarchyConflicts", num_hierarchy_conflicts_);
86 value->SetInteger("numServerConflicts", num_server_conflicts_); 86 value->SetInteger("numServerConflicts", num_server_conflicts_);
87 value->SetInteger("numEntries", num_entries_); 87 value->SetInteger("numEntries", num_entries_);
88 value->SetString("legacySource", 88 value->SetString("legacySource", ProtoEnumToString(legacy_updates_source_));
89 GetUpdatesSourceString(legacy_updates_source_));
90 value->SetBoolean("notificationsEnabled", notifications_enabled_); 89 value->SetBoolean("notificationsEnabled", notifications_enabled_);
91 90
92 std::unique_ptr<base::DictionaryValue> counter_entries( 91 std::unique_ptr<base::DictionaryValue> counter_entries(
93 new base::DictionaryValue()); 92 new base::DictionaryValue());
94 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; i++) { 93 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; i++) {
95 std::unique_ptr<base::DictionaryValue> type_entries( 94 std::unique_ptr<base::DictionaryValue> type_entries(
96 new base::DictionaryValue()); 95 new base::DictionaryValue());
97 type_entries->SetInteger("numEntries", num_entries_by_type_[i]); 96 type_entries->SetInteger("numEntries", num_entries_by_type_[i]);
98 type_entries->SetInteger("numToDeleteEntries", 97 type_entries->SetInteger("numToDeleteEntries",
99 num_to_delete_entries_by_type_[i]); 98 num_to_delete_entries_by_type_[i]);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 const { 159 const {
161 return num_to_delete_entries_by_type_; 160 return num_to_delete_entries_by_type_;
162 } 161 }
163 162
164 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource 163 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource
165 SyncCycleSnapshot::legacy_updates_source() const { 164 SyncCycleSnapshot::legacy_updates_source() const {
166 return legacy_updates_source_; 165 return legacy_updates_source_;
167 } 166 }
168 167
169 } // namespace syncer 168 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/driver/about_sync_util.cc ('k') | components/sync/engine/events/configure_get_updates_request_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698