Add tests to verify accelerators properly work on constrained window.
[chromium-blink-merge.git] / sync / engine / process_updates_command.h
blobce793879b3658ad3b2832ccc4b0aa8ef8f1bede6
1 // Copyright 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.
5 #ifndef SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
6 #define SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
8 #include "base/compiler_specific.h"
9 #include "sync/base/sync_export.h"
10 #include "sync/engine/model_changing_syncer_command.h"
11 #include "sync/engine/syncer_types.h"
13 namespace sync_pb {
14 class SyncEntity;
17 namespace syncer {
19 namespace syncable {
20 class WriteTransaction;
23 class Cryptographer;
25 // A syncer command for verifying and processing updates.
27 // Preconditions - Updates in the SyncerSesssion have been downloaded.
29 // Postconditions - All of the verified SyncEntity data will be copied to
30 // the server fields of the corresponding syncable entries.
31 class SYNC_EXPORT_PRIVATE ProcessUpdatesCommand
32 : public ModelChangingSyncerCommand {
33 public:
34 ProcessUpdatesCommand();
35 virtual ~ProcessUpdatesCommand();
37 protected:
38 // ModelChangingSyncerCommand implementation.
39 virtual std::set<ModelSafeGroup> GetGroupsToChange(
40 const sessions::SyncSession& session) const OVERRIDE;
41 virtual SyncerError ModelChangingExecuteImpl(
42 sessions::SyncSession* session) OVERRIDE;
44 private:
45 VerifyResult VerifyUpdate(
46 syncable::WriteTransaction* trans,
47 const sync_pb::SyncEntity& entry,
48 ModelTypeSet requested_types,
49 const ModelSafeRoutingInfo& routes);
50 ServerUpdateProcessingResult ProcessUpdate(
51 const sync_pb::SyncEntity& proto_update,
52 const Cryptographer* cryptographer,
53 syncable::WriteTransaction* const trans);
54 DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand);
57 } // namespace syncer
59 #endif // SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_