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

Side by Side Diff: components/sync/engine_impl/update_handler.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/sync/base/syncer_error.h" 10 #include "components/sync/base/syncer_error.h"
11 11
12 namespace sync_pb { 12 namespace sync_pb {
13 class DataTypeContext; 13 class DataTypeContext;
14 class DataTypeProgressMarker; 14 class DataTypeProgressMarker;
15 class SyncEntity; 15 class SyncEntity;
16 } 16 }
17 17
18 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList; 18 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList;
19 19
20 namespace syncer { 20 namespace syncer {
21 21
22 namespace sessions { 22 class ModelSafeWorker;
23 class StatusController; 23 class StatusController;
24 }
25
26 class ModelSafeWorker;
27 24
28 // This class represents an entity that can request, receive, and apply updates 25 // This class represents an entity that can request, receive, and apply updates
29 // from the sync server. 26 // from the sync server.
30 class UpdateHandler { 27 class UpdateHandler {
31 public: 28 public:
32 UpdateHandler(); 29 UpdateHandler();
33 virtual ~UpdateHandler() = 0; 30 virtual ~UpdateHandler() = 0;
34 31
35 // Returns true if initial sync was performed for this type. 32 // Returns true if initial sync was performed for this type.
36 virtual bool IsInitialSyncEnded() const = 0; 33 virtual bool IsInitialSyncEnded() const = 0;
(...skipping 15 matching lines...) Expand all
52 // 49 //
53 // In this context, "applicable_updates" means the set of updates belonging to 50 // In this context, "applicable_updates" means the set of updates belonging to
54 // this type. 51 // this type.
55 // 52 //
56 // Returns SYNCER_OK if the all data was processed successfully, a syncer 53 // Returns SYNCER_OK if the all data was processed successfully, a syncer
57 // error otherwise. 54 // error otherwise.
58 virtual SyncerError ProcessGetUpdatesResponse( 55 virtual SyncerError ProcessGetUpdatesResponse(
59 const sync_pb::DataTypeProgressMarker& progress_marker, 56 const sync_pb::DataTypeProgressMarker& progress_marker,
60 const sync_pb::DataTypeContext& mutated_context, 57 const sync_pb::DataTypeContext& mutated_context,
61 const SyncEntityList& applicable_updates, 58 const SyncEntityList& applicable_updates,
62 sessions::StatusController* status) = 0; 59 StatusController* status) = 0;
63 60
64 // Called at the end of a non-configure GetUpdates loop to apply any unapplied 61 // Called at the end of a non-configure GetUpdates loop to apply any unapplied
65 // updates. 62 // updates.
66 virtual void ApplyUpdates(sessions::StatusController* status) = 0; 63 virtual void ApplyUpdates(StatusController* status) = 0;
67 64
68 // Called at the end of a configure GetUpdates loop to perform any required 65 // Called at the end of a configure GetUpdates loop to perform any required
69 // post-initial-download update application. 66 // post-initial-download update application.
70 virtual void PassiveApplyUpdates(sessions::StatusController* status) = 0; 67 virtual void PassiveApplyUpdates(StatusController* status) = 0;
71 }; 68 };
72 69
73 } // namespace syncer 70 } // namespace syncer
74 71
75 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ 72 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/update_applicator.h ('k') | components/sync/protocol/client_debug_info.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698