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

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: Rebase. 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" 21 #include "components/sync/engine_impl/cycle/status_controller.h"
skym 2016/08/19 17:17:43 I don't think this is used in this file, but seems
maxbogue 2016/08/19 19:12:01 Removed and added to components/sync/engine_impl/d
22 #include "components/sync/syncable/syncable_id.h" 22 #include "components/sync/syncable/syncable_id.h"
23 23
24 namespace syncer { 24 namespace syncer {
25 25
26 namespace sessions { 26 class ConflictResolver;
skym 2016/08/19 17:17:43 Where is this used? Remove?
maxbogue 2016/08/19 19:12:01 Done.
27 class Cryptographer;
27 class StatusController; 28 class StatusController;
skym 2016/08/19 17:17:43 This is also getting #included, definitely don't n
maxbogue 2016/08/19 19:12:01 Done.
28 }
29 29
30 namespace syncable { 30 namespace syncable {
31 class WriteTransaction; 31 class WriteTransaction;
32 class Entry; 32 class Entry;
33 } 33 }
34 34
35 class ConflictResolver;
36 class Cryptographer;
37
38 class UpdateApplicator { 35 class UpdateApplicator {
39 public: 36 public:
40 explicit UpdateApplicator(Cryptographer* cryptographer); 37 explicit UpdateApplicator(Cryptographer* cryptographer);
41 ~UpdateApplicator(); 38 ~UpdateApplicator();
42 39
43 // Attempt to apply the specified updates. 40 // Attempt to apply the specified updates.
44 void AttemptApplications(syncable::WriteTransaction* trans, 41 void AttemptApplications(syncable::WriteTransaction* trans,
45 const std::vector<int64_t>& handles); 42 const std::vector<int64_t>& handles);
46 43
47 int updates_applied() { return updates_applied_; } 44 int updates_applied() { return updates_applied_; }
(...skipping 17 matching lines...) Expand all
65 int encryption_conflicts_; 62 int encryption_conflicts_;
66 int hierarchy_conflicts_; 63 int hierarchy_conflicts_;
67 std::set<syncable::Id> simple_conflict_ids_; 64 std::set<syncable::Id> simple_conflict_ids_;
68 65
69 DISALLOW_COPY_AND_ASSIGN(UpdateApplicator); 66 DISALLOW_COPY_AND_ASSIGN(UpdateApplicator);
70 }; 67 };
71 68
72 } // namespace syncer 69 } // namespace syncer
73 70
74 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_ 71 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_APPLICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698