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

Side by Side Diff: sync/engine/verify_updates_command.cc

Issue 10905045: [Sync] Pass ModelTypeSet by value everywhere (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « sync/engine/verify_updates_command.h ('k') | sync/internal_api/public/sync_manager.h » ('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/engine/verify_updates_command.h" 5 #include "sync/engine/verify_updates_command.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "sync/engine/syncer.h" 10 #include "sync/engine/syncer.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 status->increment_num_reflected_updates_downloaded_by(1); 142 status->increment_num_reflected_updates_downloaded_by(1);
143 if (update.deleted()) 143 if (update.deleted())
144 status->increment_num_tombstone_updates_downloaded_by(1); 144 status->increment_num_tombstone_updates_downloaded_by(1);
145 } 145 }
146 146
147 return SYNCER_OK; 147 return SYNCER_OK;
148 } 148 }
149 149
150 VerifyUpdatesCommand::VerifyUpdateResult VerifyUpdatesCommand::VerifyUpdate( 150 VerifyUpdatesCommand::VerifyUpdateResult VerifyUpdatesCommand::VerifyUpdate(
151 syncable::WriteTransaction* trans, const sync_pb::SyncEntity& entry, 151 syncable::WriteTransaction* trans, const sync_pb::SyncEntity& entry,
152 const ModelTypeSet& requested_types, 152 ModelTypeSet requested_types,
153 const ModelSafeRoutingInfo& routes) { 153 const ModelSafeRoutingInfo& routes) {
154 syncable::Id id = SyncableIdFromProto(entry.id_string()); 154 syncable::Id id = SyncableIdFromProto(entry.id_string());
155 VerifyUpdateResult result = {VERIFY_FAIL, GROUP_PASSIVE}; 155 VerifyUpdateResult result = {VERIFY_FAIL, GROUP_PASSIVE};
156 156
157 const bool deleted = entry.has_deleted() && entry.deleted(); 157 const bool deleted = entry.has_deleted() && entry.deleted();
158 const bool is_directory = IsFolder(entry); 158 const bool is_directory = IsFolder(entry);
159 const ModelType model_type = GetModelType(entry); 159 const ModelType model_type = GetModelType(entry);
160 160
161 if (!id.ServerKnows()) { 161 if (!id.ServerKnows()) {
162 LOG(ERROR) << "Illegal negative id in received updates"; 162 LOG(ERROR) << "Illegal negative id in received updates";
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 deleted, is_directory, model_type); 201 deleted, is_directory, model_type);
202 } 202 }
203 203
204 if (VERIFY_UNDECIDED == result.value) 204 if (VERIFY_UNDECIDED == result.value)
205 result.value = VERIFY_SUCCESS; // No news is good news. 205 result.value = VERIFY_SUCCESS; // No news is good news.
206 206
207 return result; // This might be VERIFY_SUCCESS as well 207 return result; // This might be VERIFY_SUCCESS as well
208 } 208 }
209 209
210 } // namespace syncer 210 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/verify_updates_command.h ('k') | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698