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

Side by Side Diff: chrome/browser/sync/engine/process_updates_command.h

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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
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 CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/engine/model_changing_syncer_command.h"
11 #include "chrome/browser/sync/engine/syncer_types.h"
12
13 namespace syncable {
14 class WriteTransaction;
15 }
16
17 namespace sync_pb {
18 class SyncEntity;
19 }
20
21 namespace browser_sync {
22
23 class Cryptographer;
24
25 // A syncer command for processing updates.
26 //
27 // Preconditions - updates in the SyncerSesssion have been downloaded
28 // and verified.
29 //
30 // Postconditions - All of the verified SyncEntity data will be copied to
31 // the server fields of the corresponding syncable entries.
32 // TODO(tim): This should not be ModelChanging (bug 36592).
33 class ProcessUpdatesCommand : public ModelChangingSyncerCommand {
34 public:
35 ProcessUpdatesCommand();
36 virtual ~ProcessUpdatesCommand();
37
38 protected:
39 // ModelChangingSyncerCommand implementation.
40 virtual std::set<ModelSafeGroup> GetGroupsToChange(
41 const sessions::SyncSession& session) const OVERRIDE;
42 virtual SyncerError ModelChangingExecuteImpl(
43 sessions::SyncSession* session) OVERRIDE;
44
45 private:
46 ServerUpdateProcessingResult ProcessUpdate(
47 const sync_pb::SyncEntity& proto_update,
48 const Cryptographer* cryptographer,
49 syncable::WriteTransaction* const trans);
50 DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand);
51 };
52
53 } // namespace browser_sync
54
55 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698