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

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

Issue 11091009: sync: Merge {Verify,Process}UpdatesCommand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Amend comment Created 8 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 | Annotate | Revision Log
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/engine/verify_updates_command.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
6 #define SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "sync/engine/model_changing_syncer_command.h"
11 #include "sync/engine/syncer_types.h"
12 #include "sync/internal_api/public/engine/model_safe_worker.h"
13
14 namespace syncer {
15
16 namespace syncable {
17 class WriteTransaction;
18 }
19
20 // Verifies the response from a GetUpdates request. All invalid updates will be
21 // noted in the SyncSession after this command is executed.
22 class VerifyUpdatesCommand : public ModelChangingSyncerCommand {
23 public:
24 VerifyUpdatesCommand();
25 virtual ~VerifyUpdatesCommand();
26
27 protected:
28 // ModelChangingSyncerCommand implementation.
29 virtual std::set<ModelSafeGroup> GetGroupsToChange(
30 const sessions::SyncSession& session) const OVERRIDE;
31 virtual SyncerError ModelChangingExecuteImpl(
32 sessions::SyncSession* session) OVERRIDE;
33
34 private:
35 struct VerifyUpdateResult {
36 VerifyResult value;
37 ModelSafeGroup placement;
38 };
39 VerifyUpdateResult VerifyUpdate(syncable::WriteTransaction* trans,
40 const sync_pb::SyncEntity& entry,
41 ModelTypeSet requested_types,
42 const ModelSafeRoutingInfo& routes);
43 DISALLOW_COPY_AND_ASSIGN(VerifyUpdatesCommand);
44 };
45
46 } // namespace syncer
47
48 #endif // SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
OLDNEW
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/engine/verify_updates_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698