| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 428 |
| 429 // Returns whether sync is allowed to run based on command-line switches. | 429 // Returns whether sync is allowed to run based on command-line switches. |
| 430 // Profile::IsSyncAllowed() is probably a better signal than this function. | 430 // Profile::IsSyncAllowed() is probably a better signal than this function. |
| 431 // This function can be called from any thread, and the implementation doesn't | 431 // This function can be called from any thread, and the implementation doesn't |
| 432 // assume it's running on the UI thread. | 432 // assume it's running on the UI thread. |
| 433 static bool IsSyncAllowedByFlag(); | 433 static bool IsSyncAllowedByFlag(); |
| 434 | 434 |
| 435 // Returns whether sync is currently allowed on this platform. | 435 // Returns whether sync is currently allowed on this platform. |
| 436 bool IsSyncAllowedByPlatform() const; | 436 bool IsSyncAllowedByPlatform() const; |
| 437 | 437 |
| 438 // Whether sync is currently blocked from starting because the sync |
| 439 // confirmation dialog hasn't been confirmed. |
| 440 bool IsSyncConfirmationNeeded() const; |
| 441 |
| 438 // Returns whether sync is managed, i.e. controlled by configuration | 442 // Returns whether sync is managed, i.e. controlled by configuration |
| 439 // management. If so, the user is not allowed to configure sync. | 443 // management. If so, the user is not allowed to configure sync. |
| 440 virtual bool IsManaged() const; | 444 virtual bool IsManaged() const; |
| 441 | 445 |
| 442 // syncer::UnrecoverableErrorHandler implementation. | 446 // syncer::UnrecoverableErrorHandler implementation. |
| 443 void OnUnrecoverableError(const tracked_objects::Location& from_here, | 447 void OnUnrecoverableError(const tracked_objects::Location& from_here, |
| 444 const std::string& message) override; | 448 const std::string& message) override; |
| 445 | 449 |
| 446 // The functions below (until ActivateDataType()) should only be | 450 // The functions below (until ActivateDataType()) should only be |
| 447 // called if IsEngineInitialized() is true. | 451 // called if IsEngineInitialized() is true. |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 896 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
| 893 | 897 |
| 894 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 898 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 895 }; | 899 }; |
| 896 | 900 |
| 897 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 901 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
| 898 | 902 |
| 899 } // namespace browser_sync | 903 } // namespace browser_sync |
| 900 | 904 |
| 901 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 905 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |