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

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

Issue 387983004: sync: Support non-blocking initial sync in proto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix comment 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
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
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 syncer::ModelType type, 118 syncer::ModelType type,
119 scoped_ptr<InvalidationInterface> invalidation, 119 scoped_ptr<InvalidationInterface> invalidation,
120 const tracked_objects::Location& nudge_location) = 0; 120 const tracked_objects::Location& nudge_location) = 0;
121 121
122 // Requests a non-blocking initial sync request for the specified type.
123 //
124 // Many types can only complete initial sync while the scheduler is in
125 // configure mode, but a few of them are able to perform their initial sync
126 // while the scheduler is in normal mode. This non-blocking initial sync
127 // can be requested through this function.
128 virtual void ScheduleInitialSyncNudge(syncer::ModelType model_type) = 0;
129
122 // Change status of notifications in the SyncSessionContext. 130 // Change status of notifications in the SyncSessionContext.
123 virtual void SetNotificationsEnabled(bool notifications_enabled) = 0; 131 virtual void SetNotificationsEnabled(bool notifications_enabled) = 0;
124 132
125 virtual base::TimeDelta GetSessionsCommitDelay() const = 0; 133 virtual base::TimeDelta GetSessionsCommitDelay() const = 0;
126 134
127 // Called when credentials are updated by the user. 135 // Called when credentials are updated by the user.
128 virtual void OnCredentialsUpdated() = 0; 136 virtual void OnCredentialsUpdated() = 0;
129 137
130 // Called when the network layer detects a connection status change. 138 // Called when the network layer detects a connection status change.
131 virtual void OnConnectionStatusChange() = 0; 139 virtual void OnConnectionStatusChange() = 0;
132 }; 140 };
133 141
134 } // namespace syncer 142 } // namespace syncer
135 143
136 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_ 144 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698