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

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

Issue 271613006: sync: Populate debug counters for directory types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | sync/engine/conflict_resolver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include <set> 11 #include <set>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "sync/engine/syncer_types.h" 15 #include "sync/engine/syncer_types.h"
16 16
17 namespace syncer { 17 namespace syncer {
18 18
19 namespace syncable { 19 namespace syncable {
20 class Id; 20 class Id;
21 class WriteTransaction; 21 class WriteTransaction;
22 } // namespace syncable 22 } // namespace syncable
23 23
24 class Cryptographer; 24 class Cryptographer;
25 struct UpdateCounters;
25 26
26 namespace sessions { 27 namespace sessions {
27 class StatusController; 28 class StatusController;
28 } // namespace sessions 29 } // namespace sessions
29 30
30 class ConflictResolver { 31 class ConflictResolver {
31 friend class SyncerTest; 32 friend class SyncerTest;
32 FRIEND_TEST_ALL_PREFIXES(SyncerTest, 33 FRIEND_TEST_ALL_PREFIXES(SyncerTest,
33 ConflictResolverMergeOverwritesLocalEntry); 34 ConflictResolverMergeOverwritesLocalEntry);
34 public: 35 public:
(...skipping 10 matching lines...) Expand all
45 CONFLICT_RESOLUTION_SIZE, 46 CONFLICT_RESOLUTION_SIZE,
46 }; 47 };
47 48
48 ConflictResolver(); 49 ConflictResolver();
49 ~ConflictResolver(); 50 ~ConflictResolver();
50 // Called by the syncer at the end of a update/commit cycle. 51 // Called by the syncer at the end of a update/commit cycle.
51 // Returns true if the syncer should try to apply its updates again. 52 // Returns true if the syncer should try to apply its updates again.
52 void ResolveConflicts(syncable::WriteTransaction* trans, 53 void ResolveConflicts(syncable::WriteTransaction* trans,
53 const Cryptographer* cryptographer, 54 const Cryptographer* cryptographer,
54 const std::set<syncable::Id>& simple_conflict_ids, 55 const std::set<syncable::Id>& simple_conflict_ids,
55 sessions::StatusController* status); 56 sessions::StatusController* status,
57 UpdateCounters* counters);
tim (not reviewing) 2014/05/12 17:33:53 It's unfortunate to have two status-tracking param
rlarocque 2014/05/12 18:13:18 The point of this effort is to replace the StatusC
56 58
57 private: 59 private:
58 void ProcessSimpleConflict( 60 void ProcessSimpleConflict(
59 syncable::WriteTransaction* trans, 61 syncable::WriteTransaction* trans,
60 const syncable::Id& id, 62 const syncable::Id& id,
61 const Cryptographer* cryptographer, 63 const Cryptographer* cryptographer,
62 sessions::StatusController* status); 64 sessions::StatusController* status,
65 UpdateCounters* counters);
63 66
64 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); 67 DISALLOW_COPY_AND_ASSIGN(ConflictResolver);
65 }; 68 };
66 69
67 } // namespace syncer 70 } // namespace syncer
68 71
69 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ 72 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_
OLDNEW
« no previous file with comments | « no previous file | sync/engine/conflict_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698