| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "sync/internal_api/public/shutdown_reason.h" | 48 #include "sync/internal_api/public/shutdown_reason.h" |
| 49 #include "sync/internal_api/public/sync_manager_factory.h" | 49 #include "sync/internal_api/public/sync_manager_factory.h" |
| 50 #include "sync/internal_api/public/user_share.h" | 50 #include "sync/internal_api/public/user_share.h" |
| 51 #include "sync/internal_api/public/util/experiments.h" | 51 #include "sync/internal_api/public/util/experiments.h" |
| 52 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 52 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
| 53 #include "sync/js/sync_js_controller.h" | 53 #include "sync/js/sync_js_controller.h" |
| 54 #include "url/gurl.h" | 54 #include "url/gurl.h" |
| 55 | 55 |
| 56 class Profile; | 56 class Profile; |
| 57 class ProfileOAuth2TokenService; | 57 class ProfileOAuth2TokenService; |
| 58 class ProfileSyncComponentsFactory; | |
| 59 class SupervisedUserSigninManagerWrapper; | 58 class SupervisedUserSigninManagerWrapper; |
| 60 class SyncErrorController; | 59 class SyncErrorController; |
| 61 class SyncTypePreferenceProvider; | 60 class SyncTypePreferenceProvider; |
| 62 | 61 |
| 63 namespace base { | 62 namespace base { |
| 64 class CommandLine; | 63 class CommandLine; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 namespace browser_sync { | 66 namespace browser_sync { |
| 68 class BackendMigrator; | 67 class BackendMigrator; |
| 69 class FaviconCache; | 68 class FaviconCache; |
| 70 class JsController; | 69 class JsController; |
| 71 | 70 |
| 72 namespace sessions { | 71 namespace sessions { |
| 73 class SyncSessionSnapshot; | 72 class SyncSessionSnapshot; |
| 74 } // namespace sessions | 73 } // namespace sessions |
| 75 } // namespace browser_sync | 74 } // namespace browser_sync |
| 76 | 75 |
| 77 namespace sync_driver { | 76 namespace sync_driver { |
| 78 class ChangeProcessor; | 77 class ChangeProcessor; |
| 79 class DataTypeManager; | 78 class DataTypeManager; |
| 80 class DeviceInfoSyncService; | 79 class DeviceInfoSyncService; |
| 81 class LocalDeviceInfoProvider; | 80 class LocalDeviceInfoProvider; |
| 82 class OpenTabsUIDelegate; | 81 class OpenTabsUIDelegate; |
| 82 class SyncApiComponentFactory; |
| 83 } // namespace sync_driver | 83 } // namespace sync_driver |
| 84 | 84 |
| 85 namespace syncer { | 85 namespace syncer { |
| 86 class BaseTransaction; | 86 class BaseTransaction; |
| 87 class NetworkResources; | 87 class NetworkResources; |
| 88 struct CommitCounters; | 88 struct CommitCounters; |
| 89 struct StatusCounters; | 89 struct StatusCounters; |
| 90 struct SyncCredentials; | 90 struct SyncCredentials; |
| 91 struct UpdateCounters; | 91 struct UpdateCounters; |
| 92 struct UserShare; | 92 struct UserShare; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 enum BackendMode { | 250 enum BackendMode { |
| 251 IDLE, // No backend. | 251 IDLE, // No backend. |
| 252 SYNC, // Backend for syncing. | 252 SYNC, // Backend for syncing. |
| 253 BACKUP, // Backend for backup. | 253 BACKUP, // Backend for backup. |
| 254 ROLLBACK // Backend for rollback. | 254 ROLLBACK // Backend for rollback. |
| 255 }; | 255 }; |
| 256 | 256 |
| 257 // Takes ownership of |factory| and |signin_wrapper|. | 257 // Takes ownership of |factory| and |signin_wrapper|. |
| 258 ProfileSyncService( | 258 ProfileSyncService( |
| 259 scoped_ptr<ProfileSyncComponentsFactory> factory, | 259 scoped_ptr<sync_driver::SyncApiComponentFactory> factory, |
| 260 Profile* profile, | 260 Profile* profile, |
| 261 scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper, | 261 scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper, |
| 262 ProfileOAuth2TokenService* oauth2_token_service, | 262 ProfileOAuth2TokenService* oauth2_token_service, |
| 263 browser_sync::ProfileSyncServiceStartBehavior start_behavior); | 263 browser_sync::ProfileSyncServiceStartBehavior start_behavior); |
| 264 ~ProfileSyncService() override; | 264 ~ProfileSyncService() override; |
| 265 | 265 |
| 266 // Initializes the object. This must be called at most once, and | 266 // Initializes the object. This must be called at most once, and |
| 267 // immediately after an object of this class is constructed. | 267 // immediately after an object of this class is constructed. |
| 268 void Initialize(); | 268 void Initialize(); |
| 269 | 269 |
| 270 // sync_driver::SyncService implementation | 270 // sync_driver::SyncService implementation |
| 271 bool HasSyncSetupCompleted() const override; | 271 bool HasSyncSetupCompleted() const override; |
| 272 bool IsSyncAllowed() const override; | 272 bool IsSyncAllowed() const override; |
| 273 bool IsSyncActive() const override; | 273 bool IsSyncActive() const override; |
| 274 void OnDataTypeRequestsSyncStartup(syncer::ModelType type) override; | 274 void OnDataTypeRequestsSyncStartup(syncer::ModelType type) override; |
| 275 bool CanSyncStart() const override; | 275 bool CanSyncStart() const override; |
| 276 void RequestStop(SyncStopDataFate data_fate) override; | 276 void RequestStop(SyncStopDataFate data_fate) override; |
| 277 void RequestStart() override; | 277 void RequestStart() override; |
| 278 syncer::ModelTypeSet GetActiveDataTypes() const override; | 278 syncer::ModelTypeSet GetActiveDataTypes() const override; |
| 279 syncer::ModelTypeSet GetPreferredDataTypes() const override; | 279 syncer::ModelTypeSet GetPreferredDataTypes() const override; |
| 280 void OnUserChoseDatatypes(bool sync_everything, | 280 void OnUserChoseDatatypes(bool sync_everything, |
| 281 syncer::ModelTypeSet chosen_types) override; | 281 syncer::ModelTypeSet chosen_types) override; |
| 282 void DeactivateDataType(syncer::ModelType type) override; | |
| 283 void SetSyncSetupCompleted() override; | 282 void SetSyncSetupCompleted() override; |
| 284 bool FirstSetupInProgress() const override; | 283 bool FirstSetupInProgress() const override; |
| 285 void SetSetupInProgress(bool setup_in_progress) override; | 284 void SetSetupInProgress(bool setup_in_progress) override; |
| 286 bool setup_in_progress() const override; | 285 bool setup_in_progress() const override; |
| 287 bool ConfigurationDone() const override; | 286 bool ConfigurationDone() const override; |
| 288 const GoogleServiceAuthError& GetAuthError() const override; | 287 const GoogleServiceAuthError& GetAuthError() const override; |
| 289 bool HasUnrecoverableError() const override; | 288 bool HasUnrecoverableError() const override; |
| 290 bool backend_initialized() const override; | 289 bool backend_initialized() const override; |
| 291 sync_driver::OpenTabsUIDelegate* GetOpenTabsUIDelegate() override; | 290 sync_driver::OpenTabsUIDelegate* GetOpenTabsUIDelegate() override; |
| 292 bool IsPassphraseRequiredForDecryption() const override; | 291 bool IsPassphraseRequiredForDecryption() const override; |
| 293 base::Time GetExplicitPassphraseTime() const override; | 292 base::Time GetExplicitPassphraseTime() const override; |
| 294 bool IsUsingSecondaryPassphrase() const override; | 293 bool IsUsingSecondaryPassphrase() const override; |
| 295 void EnableEncryptEverything() override; | 294 void EnableEncryptEverything() override; |
| 295 bool EncryptEverythingEnabled() const override; |
| 296 void SetEncryptionPassphrase(const std::string& passphrase, | 296 void SetEncryptionPassphrase(const std::string& passphrase, |
| 297 PassphraseType type) override; | 297 PassphraseType type) override; |
| 298 bool SetDecryptionPassphrase(const std::string& passphrase) override | 298 bool SetDecryptionPassphrase(const std::string& passphrase) override |
| 299 WARN_UNUSED_RESULT; | 299 WARN_UNUSED_RESULT; |
| 300 bool IsCryptographerReady( | 300 bool IsCryptographerReady( |
| 301 const syncer::BaseTransaction* trans) const override; | 301 const syncer::BaseTransaction* trans) const override; |
| 302 syncer::UserShare* GetUserShare() const override; | 302 syncer::UserShare* GetUserShare() const override; |
| 303 sync_driver::LocalDeviceInfoProvider* GetLocalDeviceInfoProvider() |
| 304 const override; |
| 303 void AddObserver(sync_driver::SyncServiceObserver* observer) override; | 305 void AddObserver(sync_driver::SyncServiceObserver* observer) override; |
| 304 void RemoveObserver(sync_driver::SyncServiceObserver* observer) override; | 306 void RemoveObserver(sync_driver::SyncServiceObserver* observer) override; |
| 305 bool HasObserver( | 307 bool HasObserver( |
| 306 const sync_driver::SyncServiceObserver* observer) const override; | 308 const sync_driver::SyncServiceObserver* observer) const override; |
| 309 void RegisterDataTypeController( |
| 310 sync_driver::DataTypeController* data_type_controller) override; |
| 311 void ReenableDatatype(syncer::ModelType type) override; |
| 312 void DeactivateDataType(syncer::ModelType type) override; |
| 307 | 313 |
| 308 void AddProtocolEventObserver(browser_sync::ProtocolEventObserver* observer); | 314 void AddProtocolEventObserver(browser_sync::ProtocolEventObserver* observer); |
| 309 void RemoveProtocolEventObserver( | 315 void RemoveProtocolEventObserver( |
| 310 browser_sync::ProtocolEventObserver* observer); | 316 browser_sync::ProtocolEventObserver* observer); |
| 311 | 317 |
| 312 void AddTypeDebugInfoObserver(syncer::TypeDebugInfoObserver* observer); | 318 void AddTypeDebugInfoObserver(syncer::TypeDebugInfoObserver* observer); |
| 313 void RemoveTypeDebugInfoObserver(syncer::TypeDebugInfoObserver* observer); | 319 void RemoveTypeDebugInfoObserver(syncer::TypeDebugInfoObserver* observer); |
| 314 | 320 |
| 315 // Add a sync type preference provider. Each provider may only be added once. | 321 // Add a sync type preference provider. Each provider may only be added once. |
| 316 void AddPreferenceProvider(SyncTypePreferenceProvider* provider); | 322 void AddPreferenceProvider(SyncTypePreferenceProvider* provider); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 330 void GetAllNodes( | 336 void GetAllNodes( |
| 331 const base::Callback<void(scoped_ptr<base::ListValue>)>& callback); | 337 const base::Callback<void(scoped_ptr<base::ListValue>)>& callback); |
| 332 | 338 |
| 333 void RegisterAuthNotifications(); | 339 void RegisterAuthNotifications(); |
| 334 void UnregisterAuthNotifications(); | 340 void UnregisterAuthNotifications(); |
| 335 | 341 |
| 336 // Return whether OAuth2 refresh token is loaded and available for the backend | 342 // Return whether OAuth2 refresh token is loaded and available for the backend |
| 337 // to start up. Virtual to enable mocking in tests. | 343 // to start up. Virtual to enable mocking in tests. |
| 338 virtual bool IsOAuthRefreshTokenAvailable(); | 344 virtual bool IsOAuthRefreshTokenAvailable(); |
| 339 | 345 |
| 340 // Registers a data type controller with the sync service. This | |
| 341 // makes the data type controller available for use, it does not | |
| 342 // enable or activate the synchronization of the data type (see | |
| 343 // ActivateDataType). Takes ownership of the pointer. | |
| 344 void RegisterDataTypeController( | |
| 345 sync_driver::DataTypeController* data_type_controller); | |
| 346 | |
| 347 // Registers a type whose sync storage will not be managed by the | 346 // Registers a type whose sync storage will not be managed by the |
| 348 // ProfileSyncService. It declares that this sync type may be activated at | 347 // ProfileSyncService. It declares that this sync type may be activated at |
| 349 // some point in the future. This function call does not enable or activate | 348 // some point in the future. This function call does not enable or activate |
| 350 // the syncing of this type | 349 // the syncing of this type |
| 351 void RegisterNonBlockingType(syncer::ModelType type); | 350 void RegisterNonBlockingType(syncer::ModelType type); |
| 352 | 351 |
| 353 // Called by a component that supports non-blocking sync when it is ready to | 352 // Called by a component that supports non-blocking sync when it is ready to |
| 354 // initialize its connection to the sync backend. | 353 // initialize its connection to the sync backend. |
| 355 // | 354 // |
| 356 // If policy allows for syncing this type (ie. it is "preferred"), then this | 355 // If policy allows for syncing this type (ie. it is "preferred"), then this |
| 357 // should result in a message to enable syncing for this type when the sync | 356 // should result in a message to enable syncing for this type when the sync |
| 358 // backend is available. If the type is not to be synced, this should result | 357 // backend is available. If the type is not to be synced, this should result |
| 359 // in a message that allows the component to delete its local sync state. | 358 // in a message that allows the component to delete its local sync state. |
| 360 void InitializeNonBlockingType( | 359 void InitializeNonBlockingType( |
| 361 syncer::ModelType type, | 360 syncer::ModelType type, |
| 362 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 361 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
| 363 const base::WeakPtr<syncer_v2::ModelTypeSyncProxyImpl>& proxy); | 362 const base::WeakPtr<syncer_v2::ModelTypeSyncProxyImpl>& proxy); |
| 364 | 363 |
| 365 // Returns the SyncedWindowDelegatesGetter from the embedded sessions manager. | 364 // Returns the SyncedWindowDelegatesGetter from the embedded sessions manager. |
| 366 virtual browser_sync::SyncedWindowDelegatesGetter* | 365 virtual browser_sync::SyncedWindowDelegatesGetter* |
| 367 GetSyncedWindowDelegatesGetter() const; | 366 GetSyncedWindowDelegatesGetter() const; |
| 368 | 367 |
| 369 // Returns the SyncableService for syncer::SESSIONS. | 368 // Returns the SyncableService for syncer::SESSIONS. |
| 370 virtual syncer::SyncableService* GetSessionsSyncableService(); | 369 virtual syncer::SyncableService* GetSessionsSyncableService(); |
| 371 | 370 |
| 372 // Returns the SyncableService for syncer::DEVICE_INFO. | 371 // Returns the SyncableService for syncer::DEVICE_INFO. |
| 373 virtual syncer::SyncableService* GetDeviceInfoSyncableService(); | 372 virtual syncer::SyncableService* GetDeviceInfoSyncableService(); |
| 374 | 373 |
| 375 // Returns DeviceInfo provider for the local device. | |
| 376 virtual sync_driver::LocalDeviceInfoProvider* GetLocalDeviceInfoProvider(); | |
| 377 | |
| 378 // Returns synced devices tracker. | 374 // Returns synced devices tracker. |
| 379 virtual sync_driver::DeviceInfoTracker* GetDeviceInfoTracker() const; | 375 virtual sync_driver::DeviceInfoTracker* GetDeviceInfoTracker() const; |
| 380 | 376 |
| 381 // Fills state_map with a map of current data types that are possible to | 377 // Fills state_map with a map of current data types that are possible to |
| 382 // sync, as well as their states. | 378 // sync, as well as their states. |
| 383 void GetDataTypeControllerStates( | 379 void GetDataTypeControllerStates( |
| 384 sync_driver::DataTypeController::StateMap* state_map) const; | 380 sync_driver::DataTypeController::StateMap* state_map) const; |
| 385 | 381 |
| 386 // SyncFrontend implementation. | 382 // SyncFrontend implementation. |
| 387 void OnBackendInitialized( | 383 void OnBackendInitialized( |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // Returns a human readable string describing backend initialization state. | 465 // Returns a human readable string describing backend initialization state. |
| 470 std::string GetBackendInitializationStateString() const; | 466 std::string GetBackendInitializationStateString() const; |
| 471 | 467 |
| 472 // Returns true if sync is requested to be running by the user. | 468 // Returns true if sync is requested to be running by the user. |
| 473 // Note that this does not mean that sync WILL be running; e.g. if | 469 // Note that this does not mean that sync WILL be running; e.g. if |
| 474 // IsSyncAllowed() is false then sync won't start, and if the user | 470 // IsSyncAllowed() is false then sync won't start, and if the user |
| 475 // doesn't confirm their settings (HasSyncSetupCompleted), sync will | 471 // doesn't confirm their settings (HasSyncSetupCompleted), sync will |
| 476 // never become active. Use IsSyncActive to see if sync is running. | 472 // never become active. Use IsSyncActive to see if sync is running. |
| 477 virtual bool IsSyncRequested() const; | 473 virtual bool IsSyncRequested() const; |
| 478 | 474 |
| 479 ProfileSyncComponentsFactory* factory() { return factory_.get(); } | 475 sync_driver::SyncApiComponentFactory* factory() const { |
| 476 return factory_.get(); |
| 477 } |
| 480 | 478 |
| 481 // The profile we are syncing for. | 479 // The profile we are syncing for. |
| 482 Profile* profile() const { return profile_; } | 480 Profile* profile() const { return profile_; } |
| 483 | 481 |
| 484 // Returns a weak pointer to the service's JsController. | 482 // Returns a weak pointer to the service's JsController. |
| 485 // Overrideable for testing purposes. | 483 // Overrideable for testing purposes. |
| 486 virtual base::WeakPtr<syncer::JsController> GetJsController(); | 484 virtual base::WeakPtr<syncer::JsController> GetJsController(); |
| 487 | 485 |
| 488 // Record stats on various events. | 486 // Record stats on various events. |
| 489 static void SyncEvent(SyncEventCodes code); | 487 static void SyncEvent(SyncEventCodes code); |
| 490 | 488 |
| 491 // Returns whether sync is allowed to run based on command-line switches. | 489 // Returns whether sync is allowed to run based on command-line switches. |
| 492 // Profile::IsSyncAllowed() is probably a better signal than this function. | 490 // Profile::IsSyncAllowed() is probably a better signal than this function. |
| 493 // This function can be called from any thread, and the implementation doesn't | 491 // This function can be called from any thread, and the implementation doesn't |
| 494 // assume it's running on the UI thread. | 492 // assume it's running on the UI thread. |
| 495 static bool IsSyncAllowedByFlag(); | 493 static bool IsSyncAllowedByFlag(); |
| 496 | 494 |
| 497 // Returns whether sync is managed, i.e. controlled by configuration | 495 // Returns whether sync is managed, i.e. controlled by configuration |
| 498 // management. If so, the user is not allowed to configure sync. | 496 // management. If so, the user is not allowed to configure sync. |
| 499 virtual bool IsManaged() const; | 497 virtual bool IsManaged() const; |
| 500 | 498 |
| 501 // syncer::UnrecoverableErrorHandler implementation. | 499 // syncer::UnrecoverableErrorHandler implementation. |
| 502 void OnUnrecoverableError(const tracked_objects::Location& from_here, | 500 void OnUnrecoverableError(const tracked_objects::Location& from_here, |
| 503 const std::string& message) override; | 501 const std::string& message) override; |
| 504 | 502 |
| 505 // Called to re-enable a type disabled by DisableDatatype(..). Note, this does | |
| 506 // not change the preferred state of a datatype, and is not persisted across | |
| 507 // restarts. | |
| 508 void ReenableDatatype(syncer::ModelType type); | |
| 509 | |
| 510 // The functions below (until ActivateDataType()) should only be | 503 // The functions below (until ActivateDataType()) should only be |
| 511 // called if backend_initialized() is true. | 504 // called if backend_initialized() is true. |
| 512 | 505 |
| 513 // TODO(akalin): These two functions are used only by | 506 // TODO(akalin): These two functions are used only by |
| 514 // ProfileSyncServiceHarness. Figure out a different way to expose | 507 // ProfileSyncServiceHarness. Figure out a different way to expose |
| 515 // this info to that class, and remove these functions. | 508 // this info to that class, and remove these functions. |
| 516 | 509 |
| 517 virtual syncer::sessions::SyncSessionSnapshot | 510 virtual syncer::sessions::SyncSessionSnapshot |
| 518 GetLastSessionSnapshot() const; | 511 GetLastSessionSnapshot() const; |
| 519 | 512 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 // reusing the GAIA password. Depending on what is happening in the system, | 582 // reusing the GAIA password. Depending on what is happening in the system, |
| 590 // callers should determine which of the two methods below must be used. | 583 // callers should determine which of the two methods below must be used. |
| 591 | 584 |
| 592 // Returns true if encrypting all the sync data is allowed. If this method | 585 // Returns true if encrypting all the sync data is allowed. If this method |
| 593 // returns false, EnableEncryptEverything() should not be called. | 586 // returns false, EnableEncryptEverything() should not be called. |
| 594 virtual bool EncryptEverythingAllowed() const; | 587 virtual bool EncryptEverythingAllowed() const; |
| 595 | 588 |
| 596 // Sets whether encrypting all the sync data is allowed or not. | 589 // Sets whether encrypting all the sync data is allowed or not. |
| 597 virtual void SetEncryptEverythingAllowed(bool allowed); | 590 virtual void SetEncryptEverythingAllowed(bool allowed); |
| 598 | 591 |
| 599 // Returns true if we are currently set to encrypt all the sync data. Note: | |
| 600 // this is based on the cryptographer's settings, so if the user has recently | |
| 601 // requested encryption to be turned on, this may not be true yet. For that, | |
| 602 // encryption_pending() must be checked. | |
| 603 virtual bool EncryptEverythingEnabled() const; | |
| 604 | |
| 605 // Returns true if the syncer is waiting for new datatypes to be encrypted. | 592 // Returns true if the syncer is waiting for new datatypes to be encrypted. |
| 606 virtual bool encryption_pending() const; | 593 virtual bool encryption_pending() const; |
| 607 | 594 |
| 608 const GURL& sync_service_url() const { return sync_service_url_; } | 595 const GURL& sync_service_url() const { return sync_service_url_; } |
| 609 SigninManagerBase* signin() const; | 596 SigninManagerBase* signin() const; |
| 610 | 597 |
| 611 // Used by tests. | 598 // Used by tests. |
| 612 bool auto_start_enabled() const; | 599 bool auto_start_enabled() const; |
| 613 | 600 |
| 614 SyncErrorController* sync_error_controller() { | 601 SyncErrorController* sync_error_controller() { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 // Calls data type manager to start catch up configure. | 875 // Calls data type manager to start catch up configure. |
| 889 void BeginConfigureCatchUpBeforeClear(); | 876 void BeginConfigureCatchUpBeforeClear(); |
| 890 | 877 |
| 891 // Calls sync backend to send ClearServerDataMessage to server. | 878 // Calls sync backend to send ClearServerDataMessage to server. |
| 892 void ClearAndRestartSyncForPassphraseEncryption(); | 879 void ClearAndRestartSyncForPassphraseEncryption(); |
| 893 | 880 |
| 894 // Restarts sync clearing directory in the process. | 881 // Restarts sync clearing directory in the process. |
| 895 void OnClearServerDataDone(); | 882 void OnClearServerDataDone(); |
| 896 | 883 |
| 897 // Factory used to create various dependent objects. | 884 // Factory used to create various dependent objects. |
| 898 scoped_ptr<ProfileSyncComponentsFactory> factory_; | 885 scoped_ptr<sync_driver::SyncApiComponentFactory> factory_; |
| 899 | 886 |
| 900 // The profile whose data we are synchronizing. | 887 // The profile whose data we are synchronizing. |
| 901 Profile* profile_; | 888 Profile* profile_; |
| 902 | 889 |
| 903 // The class that handles getting, setting, and persisting sync | 890 // The class that handles getting, setting, and persisting sync |
| 904 // preferences. | 891 // preferences. |
| 905 sync_driver::SyncPrefs sync_prefs_; | 892 sync_driver::SyncPrefs sync_prefs_; |
| 906 | 893 |
| 907 // TODO(ncarter): Put this in a profile, once there is UI for it. | 894 // TODO(ncarter): Put this in a profile, once there is UI for it. |
| 908 // This specifies where to find the sync server. | 895 // This specifies where to find the sync server. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 base::WeakPtrFactory<ProfileSyncService> startup_controller_weak_factory_; | 1092 base::WeakPtrFactory<ProfileSyncService> startup_controller_weak_factory_; |
| 1106 | 1093 |
| 1107 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1094 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 1108 }; | 1095 }; |
| 1109 | 1096 |
| 1110 bool ShouldShowActionOnUI( | 1097 bool ShouldShowActionOnUI( |
| 1111 const syncer::SyncProtocolError& error); | 1098 const syncer::SyncProtocolError& error); |
| 1112 | 1099 |
| 1113 | 1100 |
| 1114 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1101 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |