| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "google_apis/gaia/oauth2_token_service.h" | 43 #include "google_apis/gaia/oauth2_token_service.h" |
| 44 #include "net/base/backoff_entry.h" | 44 #include "net/base/backoff_entry.h" |
| 45 #include "sync/internal_api/public/base/model_type.h" | 45 #include "sync/internal_api/public/base/model_type.h" |
| 46 #include "sync/internal_api/public/engine/model_safe_worker.h" | 46 #include "sync/internal_api/public/engine/model_safe_worker.h" |
| 47 #include "sync/internal_api/public/sync_manager_factory.h" | 47 #include "sync/internal_api/public/sync_manager_factory.h" |
| 48 #include "sync/internal_api/public/util/experiments.h" | 48 #include "sync/internal_api/public/util/experiments.h" |
| 49 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 49 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
| 50 #include "sync/js/sync_js_controller.h" | 50 #include "sync/js/sync_js_controller.h" |
| 51 #include "url/gurl.h" | 51 #include "url/gurl.h" |
| 52 | 52 |
| 53 class ManagedUserSigninManagerWrapper; | |
| 54 class Profile; | 53 class Profile; |
| 55 class ProfileOAuth2TokenService; | 54 class ProfileOAuth2TokenService; |
| 56 class ProfileSyncComponentsFactory; | 55 class ProfileSyncComponentsFactory; |
| 56 class SupervisedUserSigninManagerWrapper; |
| 57 class SyncErrorController; | 57 class SyncErrorController; |
| 58 | 58 |
| 59 namespace base { | 59 namespace base { |
| 60 class CommandLine; | 60 class CommandLine; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 namespace browser_sync { | 63 namespace browser_sync { |
| 64 class BackendMigrator; | 64 class BackendMigrator; |
| 65 class ChangeProcessor; | 65 class ChangeProcessor; |
| 66 class DataTypeManager; | 66 class DataTypeManager; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 // Default sync server URL. | 261 // Default sync server URL. |
| 262 static const char* kSyncServerUrl; | 262 static const char* kSyncServerUrl; |
| 263 // Sync server URL for dev channel users | 263 // Sync server URL for dev channel users |
| 264 static const char* kDevServerUrl; | 264 static const char* kDevServerUrl; |
| 265 | 265 |
| 266 // Takes ownership of |factory| and |signin_wrapper|. | 266 // Takes ownership of |factory| and |signin_wrapper|. |
| 267 ProfileSyncService( | 267 ProfileSyncService( |
| 268 ProfileSyncComponentsFactory* factory, | 268 ProfileSyncComponentsFactory* factory, |
| 269 Profile* profile, | 269 Profile* profile, |
| 270 scoped_ptr<ManagedUserSigninManagerWrapper> signin_wrapper, | 270 scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper, |
| 271 ProfileOAuth2TokenService* oauth2_token_service, | 271 ProfileOAuth2TokenService* oauth2_token_service, |
| 272 browser_sync::ProfileSyncServiceStartBehavior start_behavior); | 272 browser_sync::ProfileSyncServiceStartBehavior start_behavior); |
| 273 virtual ~ProfileSyncService(); | 273 virtual ~ProfileSyncService(); |
| 274 | 274 |
| 275 // Initializes the object. This must be called at most once, and | 275 // Initializes the object. This must be called at most once, and |
| 276 // immediately after an object of this class is constructed. | 276 // immediately after an object of this class is constructed. |
| 277 void Initialize(); | 277 void Initialize(); |
| 278 | 278 |
| 279 virtual void SetSyncSetupCompleted(); | 279 virtual void SetSyncSetupCompleted(); |
| 280 | 280 |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 // ProfileSyncService from starting backend till browser restarted or user | 992 // ProfileSyncService from starting backend till browser restarted or user |
| 993 // signed out. | 993 // signed out. |
| 994 bool sync_disabled_by_admin_; | 994 bool sync_disabled_by_admin_; |
| 995 | 995 |
| 996 // Set to true if a signin has completed but we're still waiting for the | 996 // Set to true if a signin has completed but we're still waiting for the |
| 997 // backend to refresh its credentials. | 997 // backend to refresh its credentials. |
| 998 bool is_auth_in_progress_; | 998 bool is_auth_in_progress_; |
| 999 | 999 |
| 1000 // Encapsulates user signin - used to set/get the user's authenticated | 1000 // Encapsulates user signin - used to set/get the user's authenticated |
| 1001 // email address. | 1001 // email address. |
| 1002 const scoped_ptr<ManagedUserSigninManagerWrapper> signin_; | 1002 const scoped_ptr<SupervisedUserSigninManagerWrapper> signin_; |
| 1003 | 1003 |
| 1004 // Information describing an unrecoverable error. | 1004 // Information describing an unrecoverable error. |
| 1005 UnrecoverableErrorReason unrecoverable_error_reason_; | 1005 UnrecoverableErrorReason unrecoverable_error_reason_; |
| 1006 std::string unrecoverable_error_message_; | 1006 std::string unrecoverable_error_message_; |
| 1007 tracked_objects::Location unrecoverable_error_location_; | 1007 tracked_objects::Location unrecoverable_error_location_; |
| 1008 | 1008 |
| 1009 // Manages the start and stop of the directory data types. | 1009 // Manages the start and stop of the directory data types. |
| 1010 scoped_ptr<browser_sync::DataTypeManager> directory_data_type_manager_; | 1010 scoped_ptr<browser_sync::DataTypeManager> directory_data_type_manager_; |
| 1011 | 1011 |
| 1012 // Manager for the non-blocking data types. | 1012 // Manager for the non-blocking data types. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 base::Callback<void(Profile*, base::Time, base::Time)> clear_browsing_data_; | 1123 base::Callback<void(Profile*, base::Time, base::Time)> clear_browsing_data_; |
| 1124 | 1124 |
| 1125 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1125 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 1126 }; | 1126 }; |
| 1127 | 1127 |
| 1128 bool ShouldShowActionOnUI( | 1128 bool ShouldShowActionOnUI( |
| 1129 const syncer::SyncProtocolError& error); | 1129 const syncer::SyncProtocolError& error); |
| 1130 | 1130 |
| 1131 | 1131 |
| 1132 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1132 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |