| 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 27 matching lines...) Expand all Loading... |
| 38 #include "components/sync_driver/data_type_manager_observer.h" | 38 #include "components/sync_driver/data_type_manager_observer.h" |
| 39 #include "components/sync_driver/failed_data_types_handler.h" | 39 #include "components/sync_driver/failed_data_types_handler.h" |
| 40 #include "components/sync_driver/non_blocking_data_type_manager.h" | 40 #include "components/sync_driver/non_blocking_data_type_manager.h" |
| 41 #include "components/sync_driver/sync_frontend.h" | 41 #include "components/sync_driver/sync_frontend.h" |
| 42 #include "components/sync_driver/sync_prefs.h" | 42 #include "components/sync_driver/sync_prefs.h" |
| 43 #include "google_apis/gaia/google_service_auth_error.h" | 43 #include "google_apis/gaia/google_service_auth_error.h" |
| 44 #include "google_apis/gaia/oauth2_token_service.h" | 44 #include "google_apis/gaia/oauth2_token_service.h" |
| 45 #include "net/base/backoff_entry.h" | 45 #include "net/base/backoff_entry.h" |
| 46 #include "sync/internal_api/public/base/model_type.h" | 46 #include "sync/internal_api/public/base/model_type.h" |
| 47 #include "sync/internal_api/public/engine/model_safe_worker.h" | 47 #include "sync/internal_api/public/engine/model_safe_worker.h" |
| 48 #include "sync/internal_api/public/shutdown_reason.h" |
| 48 #include "sync/internal_api/public/sync_manager_factory.h" | 49 #include "sync/internal_api/public/sync_manager_factory.h" |
| 49 #include "sync/internal_api/public/util/experiments.h" | 50 #include "sync/internal_api/public/util/experiments.h" |
| 50 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 51 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
| 51 #include "sync/js/sync_js_controller.h" | 52 #include "sync/js/sync_js_controller.h" |
| 52 #include "url/gurl.h" | 53 #include "url/gurl.h" |
| 53 | 54 |
| 54 class Profile; | 55 class Profile; |
| 55 class ProfileOAuth2TokenService; | 56 class ProfileOAuth2TokenService; |
| 56 class ProfileSyncComponentsFactory; | 57 class ProfileSyncComponentsFactory; |
| 57 class SupervisedUserSigninManagerWrapper; | 58 class SupervisedUserSigninManagerWrapper; |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 base::Time GetDeviceBackupTimeForTesting() const; | 783 base::Time GetDeviceBackupTimeForTesting() const; |
| 783 | 784 |
| 784 protected: | 785 protected: |
| 785 // Helper to configure the priority data types. | 786 // Helper to configure the priority data types. |
| 786 void ConfigurePriorityDataTypes(); | 787 void ConfigurePriorityDataTypes(); |
| 787 | 788 |
| 788 // Helper to install and configure a data type manager. | 789 // Helper to install and configure a data type manager. |
| 789 void ConfigureDataTypeManager(); | 790 void ConfigureDataTypeManager(); |
| 790 | 791 |
| 791 // Shuts down the backend sync components. | 792 // Shuts down the backend sync components. |
| 792 // |option| indicates if syncing is being disabled or not, and whether | 793 // |reason| dictates if syncing is being disabled or not, and whether |
| 793 // to claim ownership of sync thread from backend. | 794 // to claim ownership of sync thread from backend. |
| 794 void ShutdownImpl(browser_sync::SyncBackendHost::ShutdownOption option); | 795 void ShutdownImpl(syncer::ShutdownReason reason); |
| 795 | 796 |
| 796 // Return SyncCredentials from the OAuth2TokenService. | 797 // Return SyncCredentials from the OAuth2TokenService. |
| 797 syncer::SyncCredentials GetCredentials(); | 798 syncer::SyncCredentials GetCredentials(); |
| 798 | 799 |
| 799 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler(); | 800 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler(); |
| 800 | 801 |
| 801 const sync_driver::DataTypeController::TypeMap& | 802 const sync_driver::DataTypeController::TypeMap& |
| 802 directory_data_type_controllers() { | 803 directory_data_type_controllers() { |
| 803 return directory_data_type_controllers_; | 804 return directory_data_type_controllers_; |
| 804 } | 805 } |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 scoped_ptr<base::Time> last_backup_time_; | 1137 scoped_ptr<base::Time> last_backup_time_; |
| 1137 | 1138 |
| 1138 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1139 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 1139 }; | 1140 }; |
| 1140 | 1141 |
| 1141 bool ShouldShowActionOnUI( | 1142 bool ShouldShowActionOnUI( |
| 1142 const syncer::SyncProtocolError& error); | 1143 const syncer::SyncProtocolError& error); |
| 1143 | 1144 |
| 1144 | 1145 |
| 1145 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1146 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |