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

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

Issue 322333004: sync: Inject sync/'s dependency on invalidations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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 | « sync/engine/get_updates_processor_unittest.cc ('k') | sync/engine/sync_scheduler_impl.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 to schedule syncer tasks intelligently. 5 // A class to schedule syncer tasks intelligently.
6 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_H_ 6 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_H_
7 #define SYNC_ENGINE_SYNC_SCHEDULER_H_ 7 #define SYNC_ENGINE_SYNC_SCHEDULER_H_
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "sync/base/sync_export.h" 14 #include "sync/base/sync_export.h"
15 #include "sync/engine/nudge_source.h" 15 #include "sync/engine/nudge_source.h"
16 #include "sync/internal_api/public/base/invalidation_interface.h"
16 #include "sync/sessions/sync_session.h" 17 #include "sync/sessions/sync_session.h"
17 18
18 namespace tracked_objects { 19 namespace tracked_objects {
19 class Location; 20 class Location;
20 } // namespace tracked_objects 21 } // namespace tracked_objects
21 22
22 namespace syncer { 23 namespace syncer {
23 24
24 class ObjectIdInvalidationMap;
25 struct ServerConnectionEvent; 25 struct ServerConnectionEvent;
26 26
27 struct SYNC_EXPORT_PRIVATE ConfigurationParams { 27 struct SYNC_EXPORT_PRIVATE ConfigurationParams {
28 ConfigurationParams(); 28 ConfigurationParams();
29 ConfigurationParams( 29 ConfigurationParams(
30 const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source, 30 const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source,
31 ModelTypeSet types_to_download, 31 ModelTypeSet types_to_download,
32 const ModelSafeRoutingInfo& routing_info, 32 const ModelSafeRoutingInfo& routing_info,
33 const base::Closure& ready_task, 33 const base::Closure& ready_task,
34 const base::Closure& retry_task); 34 const base::Closure& retry_task);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const base::TimeDelta& desired_delay, 108 const base::TimeDelta& desired_delay,
109 ModelTypeSet types, 109 ModelTypeSet types,
110 const tracked_objects::Location& nudge_location) = 0; 110 const tracked_objects::Location& nudge_location) = 0;
111 111
112 // Invalidations are notifications the server sends to let us know when other 112 // Invalidations are notifications the server sends to let us know when other
113 // clients have committed data. We need to contact the sync server (being 113 // clients have committed data. We need to contact the sync server (being
114 // careful to pass along the "hints" delivered with those invalidations) in 114 // careful to pass along the "hints" delivered with those invalidations) in
115 // order to fetch the update. 115 // order to fetch the update.
116 virtual void ScheduleInvalidationNudge( 116 virtual void ScheduleInvalidationNudge(
117 const base::TimeDelta& desired_delay, 117 const base::TimeDelta& desired_delay,
118 const ObjectIdInvalidationMap& invalidations, 118 syncer::ModelType type,
119 scoped_ptr<InvalidationInterface> invalidation,
119 const tracked_objects::Location& nudge_location) = 0; 120 const tracked_objects::Location& nudge_location) = 0;
120 121
121 // Change status of notifications in the SyncSessionContext. 122 // Change status of notifications in the SyncSessionContext.
122 virtual void SetNotificationsEnabled(bool notifications_enabled) = 0; 123 virtual void SetNotificationsEnabled(bool notifications_enabled) = 0;
123 124
124 virtual base::TimeDelta GetSessionsCommitDelay() const = 0; 125 virtual base::TimeDelta GetSessionsCommitDelay() const = 0;
125 126
126 // Called when credentials are updated by the user. 127 // Called when credentials are updated by the user.
127 virtual void OnCredentialsUpdated() = 0; 128 virtual void OnCredentialsUpdated() = 0;
128 129
129 // Called when the network layer detects a connection status change. 130 // Called when the network layer detects a connection status change.
130 virtual void OnConnectionStatusChange() = 0; 131 virtual void OnConnectionStatusChange() = 0;
131 }; 132 };
132 133
133 } // namespace syncer 134 } // namespace syncer
134 135
135 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_ 136 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_
OLDNEW
« no previous file with comments | « sync/engine/get_updates_processor_unittest.cc ('k') | sync/engine/sync_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698