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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (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 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 SYNC_ENGINE_GET_UPDATES_DELEGATE_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_GET_UPDATES_DELEGATE_H_
6 #define SYNC_ENGINE_GET_UPDATES_DELEGATE_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_GET_UPDATES_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "sync/internal_api/public/events/protocol_event.h" 11 #include "components/sync/engine/events/protocol_event.h"
12 #include "sync/protocol/sync.pb.h" 12 #include "components/sync/protocol/sync.pb.h"
13 #include "sync/sessions/model_type_registry.h" 13 #include "components/sync/sessions_impl/model_type_registry.h"
14 #include "sync/sessions/nudge_tracker.h" 14 #include "components/sync/sessions_impl/nudge_tracker.h"
15 #include "sync/sessions/status_controller.h" 15 #include "components/sync/sessions_impl/status_controller.h"
16 16
17 namespace syncer { 17 namespace syncer {
18 18
19 class GetUpdatesProcessor; 19 class GetUpdatesProcessor;
20 20
21 // Interface for GetUpdates functionality that dependends on the requested 21 // Interface for GetUpdates functionality that dependends on the requested
22 // GetUpdate type (normal, configuration, poll). The GetUpdatesProcessor is 22 // GetUpdate type (normal, configuration, poll). The GetUpdatesProcessor is
23 // given an appropriate GetUpdatesDelegate to handle type specific functionality 23 // given an appropriate GetUpdatesDelegate to handle type specific functionality
24 // on construction. 24 // on construction.
25 class SYNC_EXPORT GetUpdatesDelegate { 25 class SYNC_EXPORT GetUpdatesDelegate {
26 public: 26 public:
27 GetUpdatesDelegate(); 27 GetUpdatesDelegate();
28 virtual ~GetUpdatesDelegate() = 0; 28 virtual ~GetUpdatesDelegate() = 0;
29 29
30 // Populates GetUpdate message fields that depende on GetUpdates request type. 30 // Populates GetUpdate message fields that depende on GetUpdates request type.
31 virtual void HelpPopulateGuMessage( 31 virtual void HelpPopulateGuMessage(
32 sync_pb::GetUpdatesMessage* get_updates) const = 0; 32 sync_pb::GetUpdatesMessage* get_updates) const = 0;
33 33
34 // Applies pending updates to non-control types. 34 // Applies pending updates to non-control types.
35 virtual void ApplyUpdates( 35 virtual void ApplyUpdates(ModelTypeSet gu_types,
36 ModelTypeSet gu_types, 36 sessions::StatusController* status,
37 sessions::StatusController* status, 37 UpdateHandlerMap* update_handler_map) const = 0;
38 UpdateHandlerMap* update_handler_map) const = 0;
39 38
40 virtual std::unique_ptr<ProtocolEvent> GetNetworkRequestEvent( 39 virtual std::unique_ptr<ProtocolEvent> GetNetworkRequestEvent(
41 base::Time timestamp, 40 base::Time timestamp,
42 const sync_pb::ClientToServerMessage& request) const = 0; 41 const sync_pb::ClientToServerMessage& request) const = 0;
43 }; 42 };
44 43
45 // Functionality specific to the normal GetUpdate request. 44 // Functionality specific to the normal GetUpdate request.
46 class SYNC_EXPORT NormalGetUpdatesDelegate : public GetUpdatesDelegate { 45 class SYNC_EXPORT NormalGetUpdatesDelegate : public GetUpdatesDelegate {
47 public: 46 public:
48 explicit NormalGetUpdatesDelegate( 47 explicit NormalGetUpdatesDelegate(
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 std::unique_ptr<ProtocolEvent> GetNetworkRequestEvent( 117 std::unique_ptr<ProtocolEvent> GetNetworkRequestEvent(
119 base::Time timestamp, 118 base::Time timestamp,
120 const sync_pb::ClientToServerMessage& request) const override; 119 const sync_pb::ClientToServerMessage& request) const override;
121 120
122 private: 121 private:
123 DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesDelegate); 122 DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesDelegate);
124 }; 123 };
125 124
126 } // namespace syncer 125 } // namespace syncer
127 126
128 #endif // SYNC_ENGINE_GET_UPDATES_DELEGATE_H_ 127 #endif // SYNC_ENGINE_IMPL_GET_UPDATES_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/get_commit_ids.cc ('k') | components/sync/engine_impl/get_updates_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698