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

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

Issue 8770032: [Sync] Implement encryption-aware conflict resolution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 9 years 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" 10 #include "chrome/browser/sync/engine/model_changing_syncer_command.h"
11 #include "chrome/browser/sync/engine/syncer_types.h" 11 #include "chrome/browser/sync/engine/syncer_types.h"
12 12
13 namespace syncable { 13 namespace syncable {
14 class ScopedDirLookup; 14 class ScopedDirLookup;
15 class WriteTransaction; 15 class WriteTransaction;
16 } 16 }
17 17
18 namespace sync_pb { 18 namespace sync_pb {
19 class SyncEntity; 19 class SyncEntity;
20 } 20 }
21 21
22 namespace browser_sync { 22 namespace browser_sync {
23 23
24 class Cryptographer;
25
24 // A syncer command for processing updates. 26 // A syncer command for processing updates.
25 // 27 //
26 // Preconditions - updates in the SyncerSesssion have been downloaded 28 // Preconditions - updates in the SyncerSesssion have been downloaded
27 // and verified. 29 // and verified.
28 // 30 //
29 // Postconditions - All of the verified SyncEntity data will be copied to 31 // Postconditions - All of the verified SyncEntity data will be copied to
30 // the server fields of the corresponding syncable entries. 32 // the server fields of the corresponding syncable entries.
31 // TODO(tim): This should not be ModelChanging (bug 36592). 33 // TODO(tim): This should not be ModelChanging (bug 36592).
32 class ProcessUpdatesCommand : public ModelChangingSyncerCommand { 34 class ProcessUpdatesCommand : public ModelChangingSyncerCommand {
33 public: 35 public:
34 ProcessUpdatesCommand(); 36 ProcessUpdatesCommand();
35 virtual ~ProcessUpdatesCommand(); 37 virtual ~ProcessUpdatesCommand();
36 38
37 protected: 39 protected:
38 // ModelChangingSyncerCommand implementation. 40 // ModelChangingSyncerCommand implementation.
39 virtual std::set<ModelSafeGroup> GetGroupsToChange( 41 virtual std::set<ModelSafeGroup> GetGroupsToChange(
40 const sessions::SyncSession& session) const OVERRIDE; 42 const sessions::SyncSession& session) const OVERRIDE;
41 virtual bool ModelNeutralExecuteImpl( 43 virtual bool ModelNeutralExecuteImpl(
42 sessions::SyncSession* session) OVERRIDE; 44 sessions::SyncSession* session) OVERRIDE;
43 virtual void ModelChangingExecuteImpl( 45 virtual void ModelChangingExecuteImpl(
44 sessions::SyncSession* session) OVERRIDE; 46 sessions::SyncSession* session) OVERRIDE;
45 47
46 private: 48 private:
47 ServerUpdateProcessingResult ProcessUpdate( 49 ServerUpdateProcessingResult ProcessUpdate(
48 const syncable::ScopedDirLookup& dir, 50 const syncable::ScopedDirLookup& dir,
49 const sync_pb::SyncEntity& proto_update, 51 const sync_pb::SyncEntity& proto_update,
52 const Cryptographer* cryptographer,
50 syncable::WriteTransaction* const trans); 53 syncable::WriteTransaction* const trans);
51 DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand); 54 DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand);
52 }; 55 };
53 56
54 } // namespace browser_sync 57 } // namespace browser_sync
55 58
56 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_ 59 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/get_commit_ids_command.cc ('k') | chrome/browser/sync/engine/process_updates_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698