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

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

Issue 9950137: [not for review] sync: Don't use group_restriction from ApplyUpdatesCommand. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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/model_safe_worker.cc ('k') | sync/sessions/session_state.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/process_updates_command.h" 5 #include "sync/engine/process_updates_command.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 case SUCCESS_PROCESSED: 56 case SUCCESS_PROCESSED:
57 case SUCCESS_STORED: 57 case SUCCESS_STORED:
58 break; 58 break;
59 default: 59 default:
60 NOTREACHED(); 60 NOTREACHED();
61 break; 61 break;
62 } 62 }
63 } 63 }
64 64
65 StatusController* status = session->mutable_status_controller(); 65 StatusController* status = session->mutable_status_controller();
66 status->mutable_update_progress()->CollectUpdatesToApply(dir, &trans);
66 status->mutable_update_progress()->ClearVerifiedUpdates(); 67 status->mutable_update_progress()->ClearVerifiedUpdates();
67 return SYNCER_OK; 68 return SYNCER_OK;
68 } 69 }
69 70
70 namespace { 71 namespace {
71 // Returns true if the entry is still ok to process. 72 // Returns true if the entry is still ok to process.
72 bool ReverifyEntry(syncable::WriteTransaction* trans, const SyncEntity& entry, 73 bool ReverifyEntry(syncable::WriteTransaction* trans, const SyncEntity& entry,
73 syncable::MutableEntry* same_id) { 74 syncable::MutableEntry* same_id) {
74 75
75 const bool deleted = entry.has_deleted() && entry.deleted(); 76 const bool deleted = entry.has_deleted() && entry.deleted();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 target_entry.Put(syncable::BASE_SERVER_SPECIFICS, 175 target_entry.Put(syncable::BASE_SERVER_SPECIFICS,
175 sync_pb::EntitySpecifics()); 176 sync_pb::EntitySpecifics());
176 } 177 }
177 178
178 SyncerUtil::UpdateServerFieldsFromUpdate(&target_entry, update, name); 179 SyncerUtil::UpdateServerFieldsFromUpdate(&target_entry, update, name);
179 180
180 return SUCCESS_PROCESSED; 181 return SUCCESS_PROCESSED;
181 } 182 }
182 183
183 } // namespace browser_sync 184 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/engine/model_safe_worker.cc ('k') | sync/sessions/session_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698