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

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

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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>
Nicolas Zea 2016/04/07 21:48:58 include memory?
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/internal_api/public/base/invalidation_interface.h"
17 #include "sync/sessions/sync_session.h" 17 #include "sync/sessions/sync_session.h"
18 18
19 namespace tracked_objects { 19 namespace tracked_objects {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual void ScheduleLocalRefreshRequest( 125 virtual void ScheduleLocalRefreshRequest(
126 ModelTypeSet types, 126 ModelTypeSet types,
127 const tracked_objects::Location& nudge_location) = 0; 127 const tracked_objects::Location& nudge_location) = 0;
128 128
129 // Invalidations are notifications the server sends to let us know when other 129 // Invalidations are notifications the server sends to let us know when other
130 // clients have committed data. We need to contact the sync server (being 130 // clients have committed data. We need to contact the sync server (being
131 // careful to pass along the "hints" delivered with those invalidations) in 131 // careful to pass along the "hints" delivered with those invalidations) in
132 // order to fetch the update. 132 // order to fetch the update.
133 virtual void ScheduleInvalidationNudge( 133 virtual void ScheduleInvalidationNudge(
134 syncer::ModelType type, 134 syncer::ModelType type,
135 scoped_ptr<InvalidationInterface> invalidation, 135 std::unique_ptr<InvalidationInterface> invalidation,
136 const tracked_objects::Location& nudge_location) = 0; 136 const tracked_objects::Location& nudge_location) = 0;
137 137
138 // Requests a non-blocking initial sync request for the specified type. 138 // Requests a non-blocking initial sync request for the specified type.
139 // 139 //
140 // Many types can only complete initial sync while the scheduler is in 140 // Many types can only complete initial sync while the scheduler is in
141 // configure mode, but a few of them are able to perform their initial sync 141 // configure mode, but a few of them are able to perform their initial sync
142 // while the scheduler is in normal mode. This non-blocking initial sync 142 // while the scheduler is in normal mode. This non-blocking initial sync
143 // can be requested through this function. 143 // can be requested through this function.
144 virtual void ScheduleInitialSyncNudge(syncer::ModelType model_type) = 0; 144 virtual void ScheduleInitialSyncNudge(syncer::ModelType model_type) = 0;
145 145
146 // Change status of notifications in the SyncSessionContext. 146 // Change status of notifications in the SyncSessionContext.
147 virtual void SetNotificationsEnabled(bool notifications_enabled) = 0; 147 virtual void SetNotificationsEnabled(bool notifications_enabled) = 0;
148 148
149 // Called when credentials are updated by the user. 149 // Called when credentials are updated by the user.
150 virtual void OnCredentialsUpdated() = 0; 150 virtual void OnCredentialsUpdated() = 0;
151 151
152 // Called when the network layer detects a connection status change. 152 // Called when the network layer detects a connection status change.
153 virtual void OnConnectionStatusChange() = 0; 153 virtual void OnConnectionStatusChange() = 0;
154 }; 154 };
155 155
156 } // namespace syncer 156 } // namespace syncer
157 157
158 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_ 158 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698