| OLD | NEW |
| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // overrides, and account-level overrides are examples of reasons this | 101 // overrides, and account-level overrides are examples of reasons this |
| 102 // might be false. | 102 // might be false. |
| 103 virtual bool IsSyncAllowed() const = 0; | 103 virtual bool IsSyncAllowed() const = 0; |
| 104 | 104 |
| 105 // Returns true if sync is fully initialized and active. This implies that | 105 // Returns true if sync is fully initialized and active. This implies that |
| 106 // an initial configuration has successfully completed, although there may | 106 // an initial configuration has successfully completed, although there may |
| 107 // be datatype specific, auth, or other transient errors. To see which | 107 // be datatype specific, auth, or other transient errors. To see which |
| 108 // datetypes are actually syncing, see GetActiveTypes() below. | 108 // datetypes are actually syncing, see GetActiveTypes() below. |
| 109 virtual bool IsSyncActive() const = 0; | 109 virtual bool IsSyncActive() const = 0; |
| 110 | 110 |
| 111 // Returns true if the local sync backend server has been enabled through a |
| 112 // command line flag or policy. In this case sync is considered active but any |
| 113 // implied consent for further related services e.g. Suggestions, Web History |
| 114 // etc. is considered not granted. |
| 115 virtual bool IsLocalSyncEnabled() const = 0; |
| 116 |
| 111 // Triggers a GetUpdates call for the specified |types|, pulling any new data | 117 // Triggers a GetUpdates call for the specified |types|, pulling any new data |
| 112 // from the sync server. | 118 // from the sync server. |
| 113 virtual void TriggerRefresh(const ModelTypeSet& types) = 0; | 119 virtual void TriggerRefresh(const ModelTypeSet& types) = 0; |
| 114 | 120 |
| 115 // Get the set of current active data types (those chosen or configured by | 121 // Get the set of current active data types (those chosen or configured by |
| 116 // the user which have not also encountered a runtime error). | 122 // the user which have not also encountered a runtime error). |
| 117 // Note that if the Sync engine is in the middle of a configuration, this | 123 // Note that if the Sync engine is in the middle of a configuration, this |
| 118 // will the the empty set. Once the configuration completes the set will | 124 // will the the empty set. Once the configuration completes the set will |
| 119 // be updated. | 125 // be updated. |
| 120 virtual ModelTypeSet GetActiveDataTypes() const = 0; | 126 virtual ModelTypeSet GetActiveDataTypes() const = 0; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 protected: | 332 protected: |
| 327 SyncService() {} | 333 SyncService() {} |
| 328 | 334 |
| 329 private: | 335 private: |
| 330 DISALLOW_COPY_AND_ASSIGN(SyncService); | 336 DISALLOW_COPY_AND_ASSIGN(SyncService); |
| 331 }; | 337 }; |
| 332 | 338 |
| 333 } // namespace syncer | 339 } // namespace syncer |
| 334 | 340 |
| 335 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ | 341 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ |
| OLD | NEW |