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

Side by Side Diff: components/sync_driver/sync_service.h

Issue 1418513005: [sync] Set up notification-free infra for triggering local sync refresh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 1 month 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
« no previous file with comments | « components/sync_driver/fake_sync_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_DRIVER_SYNC_SERVICE_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 virtual bool IsSyncAllowed() const = 0; 96 virtual bool IsSyncAllowed() const = 0;
97 97
98 // Returns true if sync is fully initialized and active. This implies that 98 // Returns true if sync is fully initialized and active. This implies that
99 // an initial configuration has successfully completed, although there may 99 // an initial configuration has successfully completed, although there may
100 // be datatype specific, auth, or other transient errors. To see which 100 // be datatype specific, auth, or other transient errors. To see which
101 // datetypes are actually syncing, see GetActiveTypes() below. 101 // datetypes are actually syncing, see GetActiveTypes() below.
102 // Note that if sync is in backup or rollback mode, IsSyncActive() will be 102 // Note that if sync is in backup or rollback mode, IsSyncActive() will be
103 // false. 103 // false.
104 virtual bool IsSyncActive() const = 0; 104 virtual bool IsSyncActive() const = 0;
105 105
106 // Triggers a GetUpdates call for the specified |types|, pulling any new data
107 // from the sync server.
108 virtual void TriggerRefresh(const syncer::ModelTypeSet& types) = 0;
109
106 // Get the set of current active data types (those chosen or configured by 110 // Get the set of current active data types (those chosen or configured by
107 // the user which have not also encountered a runtime error). 111 // the user which have not also encountered a runtime error).
108 // Note that if the Sync engine is in the middle of a configuration, this 112 // Note that if the Sync engine is in the middle of a configuration, this
109 // will the the empty set. Once the configuration completes the set will 113 // will the the empty set. Once the configuration completes the set will
110 // be updated. 114 // be updated.
111 virtual syncer::ModelTypeSet GetActiveDataTypes() const = 0; 115 virtual syncer::ModelTypeSet GetActiveDataTypes() const = 0;
112 116
113 // Returns the SyncClient instance associated with this service. 117 // Returns the SyncClient instance associated with this service.
114 virtual SyncClient* GetSyncClient() const = 0; 118 virtual SyncClient* GetSyncClient() const = 0;
115 119
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 protected: 327 protected:
324 SyncService() {} 328 SyncService() {}
325 329
326 private: 330 private:
327 DISALLOW_COPY_AND_ASSIGN(SyncService); 331 DISALLOW_COPY_AND_ASSIGN(SyncService);
328 }; 332 };
329 333
330 } // namespace sync_driver 334 } // namespace sync_driver
331 335
332 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ 336 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « components/sync_driver/fake_sync_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698