| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 IMPLICIT, // The user did not provide a custom passphrase for encryption. | 24 IMPLICIT, // The user did not provide a custom passphrase for encryption. |
| 25 // We implicitly use the GAIA password in such cases. | 25 // We implicitly use the GAIA password in such cases. |
| 26 EXPLICIT, // The user selected the "use custom passphrase" radio button | 26 EXPLICIT, // The user selected the "use custom passphrase" radio button |
| 27 // during sync setup and provided a passphrase. | 27 // during sync setup and provided a passphrase. |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 ~SyncService() override {} | 30 ~SyncService() override {} |
| 31 | 31 |
| 32 // Whether sync is enabled by user or not. This does not necessarily mean | 32 // Whether sync is enabled by user or not. This does not necessarily mean |
| 33 // that sync is currently running (due to delayed startup, unrecoverable | 33 // that sync is currently running (due to delayed startup, unrecoverable |
| 34 // errors, or shutdown). See SyncActive below for checking whether sync | 34 // errors, or shutdown). See IsSyncActive below for checking whether sync |
| 35 // is actually running. | 35 // is actually running. |
| 36 virtual bool HasSyncSetupCompleted() const = 0; | 36 virtual bool HasSyncSetupCompleted() const = 0; |
| 37 | 37 |
| 38 // Returns true if sync is fully initialized and active. This implies that | 38 // Returns true if sync is fully initialized and active. This implies that |
| 39 // an initial configuration has successfully completed, although there may | 39 // an initial configuration has successfully completed, although there may |
| 40 // be datatype specific, auth, or other transient errors. To see which | 40 // be datatype specific, auth, or other transient errors. To see which |
| 41 // datetypes are actually syncing, see GetActiveTypes() below. | 41 // datetypes are actually syncing, see GetActiveTypes() below. |
| 42 // Note that if sync is in backup or rollback mode, SyncActive() will be | 42 // Note that if sync is in backup or rollback mode, IsSyncActive() will be |
| 43 // false. | 43 // false. |
| 44 virtual bool SyncActive() const = 0; | 44 virtual bool IsSyncActive() const = 0; |
| 45 | 45 |
| 46 // Get the set of current active data types (those chosen or configured by | 46 // Get the set of current active data types (those chosen or configured by |
| 47 // the user which have not also encountered a runtime error). | 47 // the user which have not also encountered a runtime error). |
| 48 // Note that if the Sync engine is in the middle of a configuration, this | 48 // Note that if the Sync engine is in the middle of a configuration, this |
| 49 // will the the empty set. Once the configuration completes the set will | 49 // will the the empty set. Once the configuration completes the set will |
| 50 // be updated. | 50 // be updated. |
| 51 virtual syncer::ModelTypeSet GetActiveDataTypes() const = 0; | 51 virtual syncer::ModelTypeSet GetActiveDataTypes() const = 0; |
| 52 | 52 |
| 53 // Adds/removes an observer. SyncService does not take ownership of the | 53 // Adds/removes an observer. SyncService does not take ownership of the |
| 54 // observer. | 54 // observer. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 protected: | 161 protected: |
| 162 SyncService() {} | 162 SyncService() {} |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 DISALLOW_COPY_AND_ASSIGN(SyncService); | 165 DISALLOW_COPY_AND_ASSIGN(SyncService); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace sync_driver | 168 } // namespace sync_driver |
| 169 | 169 |
| 170 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ | 170 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ |
| OLD | NEW |