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

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

Issue 10832286: sync: Introduce control data types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ToFullModelTypeSet() function Created 8 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 // A class that watches the syncer and attempts to resolve any conflicts that 5 // A class that watches the syncer and attempts to resolve any conflicts that
6 // occur. 6 // occur.
7 7
8 #ifndef SYNC_ENGINE_CONFLICT_RESOLVER_H_ 8 #ifndef SYNC_ENGINE_CONFLICT_RESOLVER_H_
9 #define SYNC_ENGINE_CONFLICT_RESOLVER_H_ 9 #define SYNC_ENGINE_CONFLICT_RESOLVER_H_
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const Cryptographer* cryptographer, 58 const Cryptographer* cryptographer,
59 const sessions::ConflictProgress& progress, 59 const sessions::ConflictProgress& progress,
60 sessions::StatusController* status); 60 sessions::StatusController* status);
61 61
62 private: 62 private:
63 enum ProcessSimpleConflictResult { 63 enum ProcessSimpleConflictResult {
64 NO_SYNC_PROGRESS, // No changes to advance syncing made. 64 NO_SYNC_PROGRESS, // No changes to advance syncing made.
65 SYNC_PROGRESS, // Progress made. 65 SYNC_PROGRESS, // Progress made.
66 }; 66 };
67 67
68 void IgnoreLocalChanges(syncable::MutableEntry* entry);
69 void OverwriteServerChanges(syncable::WriteTransaction* trans,
70 syncable::MutableEntry* entry);
71
72 ProcessSimpleConflictResult ProcessSimpleConflict( 68 ProcessSimpleConflictResult ProcessSimpleConflict(
73 syncable::WriteTransaction* trans, 69 syncable::WriteTransaction* trans,
74 const syncable::Id& id, 70 const syncable::Id& id,
75 const Cryptographer* cryptographer, 71 const Cryptographer* cryptographer,
76 sessions::StatusController* status); 72 sessions::StatusController* status);
77 73
78 bool ResolveSimpleConflicts(syncable::WriteTransaction* trans, 74 bool ResolveSimpleConflicts(syncable::WriteTransaction* trans,
79 const Cryptographer* cryptographer, 75 const Cryptographer* cryptographer,
80 const sessions::ConflictProgress& progress, 76 const sessions::ConflictProgress& progress,
81 sessions::StatusController* status); 77 sessions::StatusController* status);
82 78
83 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); 79 DISALLOW_COPY_AND_ASSIGN(ConflictResolver);
84 }; 80 };
85 81
86 } // namespace syncer 82 } // namespace syncer
87 83
88 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ 84 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698