| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 class BaseTransaction; | 30 class BaseTransaction; |
| 31 class JsController; | 31 class JsController; |
| 32 class SyncCycleSnapshot; | 32 class SyncCycleSnapshot; |
| 33 class TypeDebugInfoObserver; | 33 class TypeDebugInfoObserver; |
| 34 struct SyncStatus; | 34 struct SyncStatus; |
| 35 struct UserShare; | 35 struct UserShare; |
| 36 | 36 |
| 37 } // namespace syncer | 37 } // namespace syncer |
| 38 | 38 |
| 39 namespace sync_sessions { |
| 40 class OpenTabsUIDelegate; |
| 41 } // namespace sync_sessions |
| 42 |
| 39 namespace sync_driver { | 43 namespace sync_driver { |
| 40 | 44 |
| 41 class DataTypeController; | 45 class DataTypeController; |
| 42 class LocalDeviceInfoProvider; | 46 class LocalDeviceInfoProvider; |
| 43 class OpenTabsUIDelegate; | |
| 44 class SyncClient; | 47 class SyncClient; |
| 45 | 48 |
| 46 // UIs that need to prevent Sync startup should hold an instance of this class | 49 // UIs that need to prevent Sync startup should hold an instance of this class |
| 47 // until the user has finished modifying sync settings. This is not an inner | 50 // until the user has finished modifying sync settings. This is not an inner |
| 48 // class of SyncService to enable forward declarations. | 51 // class of SyncService to enable forward declarations. |
| 49 class SyncSetupInProgressHandle { | 52 class SyncSetupInProgressHandle { |
| 50 public: | 53 public: |
| 51 // UIs should not construct this directly, but instead call | 54 // UIs should not construct this directly, but instead call |
| 52 // SyncService::GetSetupInProgress(). | 55 // SyncService::GetSetupInProgress(). |
| 53 explicit SyncSetupInProgressHandle(base::Closure on_destroy); | 56 explicit SyncSetupInProgressHandle(base::Closure on_destroy); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 virtual const GoogleServiceAuthError& GetAuthError() const = 0; | 208 virtual const GoogleServiceAuthError& GetAuthError() const = 0; |
| 206 virtual bool HasUnrecoverableError() const = 0; | 209 virtual bool HasUnrecoverableError() const = 0; |
| 207 | 210 |
| 208 // Returns true if the SyncBackendHost has told us it's ready to accept | 211 // Returns true if the SyncBackendHost has told us it's ready to accept |
| 209 // changes. This should only be used for sync's internal configuration logic | 212 // changes. This should only be used for sync's internal configuration logic |
| 210 // (such as deciding when to prompt for an encryption passphrase). | 213 // (such as deciding when to prompt for an encryption passphrase). |
| 211 virtual bool IsBackendInitialized() const = 0; | 214 virtual bool IsBackendInitialized() const = 0; |
| 212 | 215 |
| 213 // Return the active OpenTabsUIDelegate. If sessions is not enabled or not | 216 // Return the active OpenTabsUIDelegate. If sessions is not enabled or not |
| 214 // currently syncing, returns nullptr. | 217 // currently syncing, returns nullptr. |
| 215 virtual OpenTabsUIDelegate* GetOpenTabsUIDelegate() = 0; | 218 virtual sync_sessions::OpenTabsUIDelegate* GetOpenTabsUIDelegate() = 0; |
| 216 | 219 |
| 217 // Returns true if OnPassphraseRequired has been called for decryption and | 220 // Returns true if OnPassphraseRequired has been called for decryption and |
| 218 // we have an encrypted data type enabled. | 221 // we have an encrypted data type enabled. |
| 219 virtual bool IsPassphraseRequiredForDecryption() const = 0; | 222 virtual bool IsPassphraseRequiredForDecryption() const = 0; |
| 220 | 223 |
| 221 // Returns the time the current explicit passphrase (if any), was set. | 224 // Returns the time the current explicit passphrase (if any), was set. |
| 222 // If no secondary passphrase is in use, or no time is available, returns an | 225 // If no secondary passphrase is in use, or no time is available, returns an |
| 223 // unset base::Time. | 226 // unset base::Time. |
| 224 virtual base::Time GetExplicitPassphraseTime() const = 0; | 227 virtual base::Time GetExplicitPassphraseTime() const = 0; |
| 225 | 228 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 protected: | 341 protected: |
| 339 SyncService() {} | 342 SyncService() {} |
| 340 | 343 |
| 341 private: | 344 private: |
| 342 DISALLOW_COPY_AND_ASSIGN(SyncService); | 345 DISALLOW_COPY_AND_ASSIGN(SyncService); |
| 343 }; | 346 }; |
| 344 | 347 |
| 345 } // namespace sync_driver | 348 } // namespace sync_driver |
| 346 | 349 |
| 347 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ | 350 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ |
| OLD | NEW |