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 CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
759 scoped_ptr<syncer::NetworkResources> network_resources); | 759 scoped_ptr<syncer::NetworkResources> network_resources); |
760 | 760 |
761 virtual bool IsSessionsDataTypeControllerRunning() const; | 761 virtual bool IsSessionsDataTypeControllerRunning() const; |
762 | 762 |
763 void SetBackupStartDelayForTest(base::TimeDelta delay); | 763 void SetBackupStartDelayForTest(base::TimeDelta delay); |
764 | 764 |
765 BackendMode backend_mode() const { | 765 BackendMode backend_mode() const { |
766 return backend_mode_; | 766 return backend_mode_; |
767 } | 767 } |
768 | 768 |
769 bool is_syncing() const { | |
rlarocque
2014/06/03 22:59:48
How does this differ from ShouldPushChanges()?
haitaol1
2014/06/04 18:21:30
That should work too. Removed this.
On 2014/06/03
| |
770 return is_syncing_; | |
771 } | |
772 | |
769 protected: | 773 protected: |
770 // Helper to configure the priority data types. | 774 // Helper to configure the priority data types. |
771 void ConfigurePriorityDataTypes(); | 775 void ConfigurePriorityDataTypes(); |
772 | 776 |
773 // Helper to install and configure a data type manager. | 777 // Helper to install and configure a data type manager. |
774 void ConfigureDataTypeManager(); | 778 void ConfigureDataTypeManager(); |
775 | 779 |
776 // Shuts down the backend sync components. | 780 // Shuts down the backend sync components. |
777 // |option| indicates if syncing is being disabled or not, and whether | 781 // |option| indicates if syncing is being disabled or not, and whether |
778 // to claim ownership of sync thread from backend. | 782 // to claim ownership of sync thread from backend. |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
961 // Indicates if this is the first time sync is being configured. This value | 965 // Indicates if this is the first time sync is being configured. This value |
962 // is equal to !HasSyncSetupCompleted() at the time of OnBackendInitialized(). | 966 // is equal to !HasSyncSetupCompleted() at the time of OnBackendInitialized(). |
963 bool is_first_time_sync_configure_; | 967 bool is_first_time_sync_configure_; |
964 | 968 |
965 // List of available data type controllers for directory types. | 969 // List of available data type controllers for directory types. |
966 browser_sync::DataTypeController::TypeMap directory_data_type_controllers_; | 970 browser_sync::DataTypeController::TypeMap directory_data_type_controllers_; |
967 | 971 |
968 // Whether the SyncBackendHost has been initialized. | 972 // Whether the SyncBackendHost has been initialized. |
969 bool backend_initialized_; | 973 bool backend_initialized_; |
970 | 974 |
975 // Whether StartSyncingWithServer() has been called. | |
976 bool is_syncing_; | |
977 | |
971 // Set when sync receives DISABLED_BY_ADMIN error from server. Prevents | 978 // Set when sync receives DISABLED_BY_ADMIN error from server. Prevents |
972 // ProfileSyncService from starting backend till browser restarted or user | 979 // ProfileSyncService from starting backend till browser restarted or user |
973 // signed out. | 980 // signed out. |
974 bool sync_disabled_by_admin_; | 981 bool sync_disabled_by_admin_; |
975 | 982 |
976 // Set to true if a signin has completed but we're still waiting for the | 983 // Set to true if a signin has completed but we're still waiting for the |
977 // backend to refresh its credentials. | 984 // backend to refresh its credentials. |
978 bool is_auth_in_progress_; | 985 bool is_auth_in_progress_; |
979 | 986 |
980 // Encapsulates user signin - used to set/get the user's authenticated | 987 // Encapsulates user signin - used to set/get the user's authenticated |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1100 base::TimeDelta backup_start_delay_; | 1107 base::TimeDelta backup_start_delay_; |
1101 | 1108 |
1102 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1109 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
1103 }; | 1110 }; |
1104 | 1111 |
1105 bool ShouldShowActionOnUI( | 1112 bool ShouldShowActionOnUI( |
1106 const syncer::SyncProtocolError& error); | 1113 const syncer::SyncProtocolError& error); |
1107 | 1114 |
1108 | 1115 |
1109 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1116 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |