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

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

Issue 2828021: Take 2: sync changes to support encryption (Closed)
Patch Set: fix flaky password test under valgrind Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" 11 #include "chrome/browser/sync/engine/model_changing_syncer_command.h"
12 #include "chrome/browser/sync/engine/model_safe_worker.h" 12 #include "chrome/browser/sync/engine/model_safe_worker.h"
13 13
14 namespace syncable { 14 namespace syncable {
15 class BaseTransaction; 15 class BaseTransaction;
16 class Entry; 16 class Entry;
17 class Id; 17 class Id;
18 class MutableEntry; 18 class MutableEntry;
19 class WriteTransaction; 19 class WriteTransaction;
20 } // namespace syncable 20 } // namespace syncable
21 21
22 namespace browser_sync { 22 namespace browser_sync {
23 23
24 class ConflictResolver; 24 class ConflictResolver;
25 class Cryptographer;
25 26
26 namespace sessions { 27 namespace sessions {
27 class ConflictProgress; 28 class ConflictProgress;
28 class StatusController; 29 class StatusController;
29 } 30 }
30 31
31 class BuildAndProcessConflictSetsCommand : public ModelChangingSyncerCommand { 32 class BuildAndProcessConflictSetsCommand : public ModelChangingSyncerCommand {
32 public: 33 public:
33 BuildAndProcessConflictSetsCommand(); 34 BuildAndProcessConflictSetsCommand();
34 virtual ~BuildAndProcessConflictSetsCommand(); 35 virtual ~BuildAndProcessConflictSetsCommand();
35 36
36 // ModelChangingSyncerCommand implementation. 37 // ModelChangingSyncerCommand implementation.
37 virtual void ModelChangingExecuteImpl(sessions::SyncSession* session); 38 virtual void ModelChangingExecuteImpl(sessions::SyncSession* session);
38 39
39 private: 40 private:
40 bool BuildAndProcessConflictSets(sessions::SyncSession* session); 41 bool BuildAndProcessConflictSets(sessions::SyncSession* session);
41 42
42 bool ProcessSingleDirectionConflictSets( 43 bool ProcessSingleDirectionConflictSets(
43 syncable::WriteTransaction* trans, ConflictResolver* resolver, 44 syncable::WriteTransaction* trans, ConflictResolver* resolver,
44 sessions::StatusController* status, const ModelSafeRoutingInfo& routes); 45 Cryptographer* cryptographer, sessions::StatusController* status,
46 const ModelSafeRoutingInfo& routes);
45 bool ApplyUpdatesTransactionally( 47 bool ApplyUpdatesTransactionally(
46 syncable::WriteTransaction* trans, 48 syncable::WriteTransaction* trans,
47 const std::vector<syncable::Id>* const update_set, 49 const std::vector<syncable::Id>* const update_set,
48 ConflictResolver* resolver, 50 ConflictResolver* resolver,
51 Cryptographer* cryptographer,
49 const ModelSafeRoutingInfo& routes, 52 const ModelSafeRoutingInfo& routes,
50 sessions::StatusController* status); 53 sessions::StatusController* status);
51 void BuildConflictSets(syncable::BaseTransaction* trans, 54 void BuildConflictSets(syncable::BaseTransaction* trans,
52 sessions::ConflictProgress* conflict_progress); 55 sessions::ConflictProgress* conflict_progress);
53 56
54 void MergeSetsForNameClash(syncable::BaseTransaction* trans, 57 void MergeSetsForNameClash(syncable::BaseTransaction* trans,
55 syncable::Entry* entry, 58 syncable::Entry* entry,
56 sessions::ConflictProgress* conflict_progress); 59 sessions::ConflictProgress* conflict_progress);
57 void MergeSetsForIntroducedLoops(syncable::BaseTransaction* trans, 60 void MergeSetsForIntroducedLoops(syncable::BaseTransaction* trans,
58 syncable::Entry* entry, 61 syncable::Entry* entry,
59 sessions::ConflictProgress* conflict_progress); 62 sessions::ConflictProgress* conflict_progress);
60 void MergeSetsForNonEmptyDirectories(syncable::BaseTransaction* trans, 63 void MergeSetsForNonEmptyDirectories(syncable::BaseTransaction* trans,
61 syncable::Entry* entry, 64 syncable::Entry* entry,
62 sessions::ConflictProgress* conflict_progress); 65 sessions::ConflictProgress* conflict_progress);
63 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans, 66 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans,
64 syncable::Entry* entry, 67 syncable::Entry* entry,
65 sessions::ConflictProgress* conflict_progress); 68 sessions::ConflictProgress* conflict_progress);
66 69
67 DISALLOW_COPY_AND_ASSIGN(BuildAndProcessConflictSetsCommand); 70 DISALLOW_COPY_AND_ASSIGN(BuildAndProcessConflictSetsCommand);
68 }; 71 };
69 72
70 } // namespace browser_sync 73 } // namespace browser_sync
71 74
72 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ 75 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698