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

Side by Side Diff: components/sync/engine_impl/update_applicator.h

Issue 2258873003: [Sync] Move sessions/ to engine/cycle/ and rename things to match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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) 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 // An UpdateApplicator is used to iterate over a number of unapplied updates, 5 // An UpdateApplicator is used to iterate over a number of unapplied updates,
6 // applying them to the client using the given syncer session. 6 // applying them to the client using the given syncer cycle.
7 // 7 //
8 // UpdateApplicator might resemble an iterator, but it actually keeps retrying 8 // UpdateApplicator might resemble an iterator, but it actually keeps retrying
9 // failed updates until no remaining updates can be successfully applied. 9 // failed updates until no remaining updates can be successfully applied.
10 10
11 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_ 11 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_
12 #define COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_ 12 #define COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_
13 13
14 #include <stdint.h> 14 #include <stdint.h>
15 15
16 #include <set> 16 #include <set>
17 #include <vector> 17 #include <vector>
18 18
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "components/sync/engine/model_safe_worker.h" 20 #include "components/sync/engine/model_safe_worker.h"
21 #include "components/sync/sessions_impl/status_controller.h"
22 #include "components/sync/syncable/syncable_id.h" 21 #include "components/sync/syncable/syncable_id.h"
23 22
24 namespace syncer { 23 namespace syncer {
25 24
26 namespace sessions { 25 class Cryptographer;
27 class StatusController;
28 }
29 26
30 namespace syncable { 27 namespace syncable {
31 class WriteTransaction; 28 class WriteTransaction;
32 class Entry; 29 class Entry;
33 } 30 }
34 31
35 class ConflictResolver;
36 class Cryptographer;
37
38 class UpdateApplicator { 32 class UpdateApplicator {
39 public: 33 public:
40 explicit UpdateApplicator(Cryptographer* cryptographer); 34 explicit UpdateApplicator(Cryptographer* cryptographer);
41 ~UpdateApplicator(); 35 ~UpdateApplicator();
42 36
43 // Attempt to apply the specified updates. 37 // Attempt to apply the specified updates.
44 void AttemptApplications(syncable::WriteTransaction* trans, 38 void AttemptApplications(syncable::WriteTransaction* trans,
45 const std::vector<int64_t>& handles); 39 const std::vector<int64_t>& handles);
46 40
47 int updates_applied() { return updates_applied_; } 41 int updates_applied() { return updates_applied_; }
(...skipping 17 matching lines...) Expand all
65 int encryption_conflicts_; 59 int encryption_conflicts_;
66 int hierarchy_conflicts_; 60 int hierarchy_conflicts_;
67 std::set<syncable::Id> simple_conflict_ids_; 61 std::set<syncable::Id> simple_conflict_ids_;
68 62
69 DISALLOW_COPY_AND_ASSIGN(UpdateApplicator); 63 DISALLOW_COPY_AND_ASSIGN(UpdateApplicator);
70 }; 64 };
71 65
72 } // namespace syncer 66 } // namespace syncer
73 67
74 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_ 68 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/syncer_unittest.cc ('k') | components/sync/engine_impl/update_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698