Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: chrome/browser/sync/profile_sync_service.h

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 namespace browser_sync { 47 namespace browser_sync {
48 class BackendMigrator; 48 class BackendMigrator;
49 class ChangeProcessor; 49 class ChangeProcessor;
50 class DataTypeManager; 50 class DataTypeManager;
51 class JsController; 51 class JsController;
52 class SessionModelAssociator; 52 class SessionModelAssociator;
53 namespace sessions { class SyncSessionSnapshot; } 53 namespace sessions { class SyncSessionSnapshot; }
54 } 54 }
55 55
56 namespace csync { 56 namespace syncer {
57 class BaseTransaction; 57 class BaseTransaction;
58 struct SyncCredentials; 58 struct SyncCredentials;
59 struct UserShare; 59 struct UserShare;
60 } 60 }
61 61
62 namespace sync_pb { 62 namespace sync_pb {
63 class EncryptedData; 63 class EncryptedData;
64 } // namespace sync_pb 64 } // namespace sync_pb
65 65
66 // ProfileSyncService is the layer between browser subsystems like bookmarks, 66 // ProfileSyncService is the layer between browser subsystems like bookmarks,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // When SetSyncSetupCompleted() == false, but SetSetupInProgress(true) has 140 // When SetSyncSetupCompleted() == false, but SetSetupInProgress(true) has
141 // been called, then the sync engine knows not to download any user data. 141 // been called, then the sync engine knows not to download any user data.
142 // 142 //
143 // When initial sync is complete, the UI code should call 143 // When initial sync is complete, the UI code should call
144 // SetSyncSetupCompleted() followed by SetSetupInProgress(false) - this will 144 // SetSyncSetupCompleted() followed by SetSetupInProgress(false) - this will
145 // tell the sync engine that setup is completed and it can begin downloading 145 // tell the sync engine that setup is completed and it can begin downloading
146 // data from the sync server. 146 // data from the sync server.
147 // 147 //
148 class ProfileSyncService : public browser_sync::SyncFrontend, 148 class ProfileSyncService : public browser_sync::SyncFrontend,
149 public browser_sync::SyncPrefObserver, 149 public browser_sync::SyncPrefObserver,
150 public csync::UnrecoverableErrorHandler, 150 public syncer::UnrecoverableErrorHandler,
151 public content::NotificationObserver, 151 public content::NotificationObserver,
152 public ProfileKeyedService { 152 public ProfileKeyedService {
153 public: 153 public:
154 typedef ProfileSyncServiceObserver Observer; 154 typedef ProfileSyncServiceObserver Observer;
155 typedef browser_sync::SyncBackendHost::Status Status; 155 typedef browser_sync::SyncBackendHost::Status Status;
156 156
157 enum SyncEventCodes { 157 enum SyncEventCodes {
158 MIN_SYNC_EVENT_CODE = 0, 158 MIN_SYNC_EVENT_CODE = 0,
159 159
160 // Events starting the sync service. 160 // Events starting the sync service.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 // Disables sync for user. Use ShowLoginDialog to enable. 248 // Disables sync for user. Use ShowLoginDialog to enable.
249 virtual void DisableForUser(); 249 virtual void DisableForUser();
250 250
251 // Whether sync is enabled by user or not. 251 // Whether sync is enabled by user or not.
252 virtual bool HasSyncSetupCompleted() const; 252 virtual bool HasSyncSetupCompleted() const;
253 virtual void SetSyncSetupCompleted(); 253 virtual void SetSyncSetupCompleted();
254 254
255 // SyncFrontend implementation. 255 // SyncFrontend implementation.
256 virtual void OnBackendInitialized( 256 virtual void OnBackendInitialized(
257 const csync::WeakHandle<csync::JsBackend>& js_backend, 257 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
258 bool success) OVERRIDE; 258 bool success) OVERRIDE;
259 virtual void OnSyncCycleCompleted() OVERRIDE; 259 virtual void OnSyncCycleCompleted() OVERRIDE;
260 virtual void OnSyncConfigureRetry() OVERRIDE; 260 virtual void OnSyncConfigureRetry() OVERRIDE;
261 virtual void OnConnectionStatusChange( 261 virtual void OnConnectionStatusChange(
262 csync::ConnectionStatus status) OVERRIDE; 262 syncer::ConnectionStatus status) OVERRIDE;
263 virtual void OnStopSyncingPermanently() OVERRIDE; 263 virtual void OnStopSyncingPermanently() OVERRIDE;
264 virtual void OnPassphraseRequired( 264 virtual void OnPassphraseRequired(
265 csync::PassphraseRequiredReason reason, 265 syncer::PassphraseRequiredReason reason,
266 const sync_pb::EncryptedData& pending_keys) OVERRIDE; 266 const sync_pb::EncryptedData& pending_keys) OVERRIDE;
267 virtual void OnPassphraseAccepted() OVERRIDE; 267 virtual void OnPassphraseAccepted() OVERRIDE;
268 virtual void OnEncryptedTypesChanged( 268 virtual void OnEncryptedTypesChanged(
269 syncable::ModelTypeSet encrypted_types, 269 syncable::ModelTypeSet encrypted_types,
270 bool encrypt_everything) OVERRIDE; 270 bool encrypt_everything) OVERRIDE;
271 virtual void OnEncryptionComplete() OVERRIDE; 271 virtual void OnEncryptionComplete() OVERRIDE;
272 virtual void OnMigrationNeededForTypes( 272 virtual void OnMigrationNeededForTypes(
273 syncable::ModelTypeSet types) OVERRIDE; 273 syncable::ModelTypeSet types) OVERRIDE;
274 virtual void OnExperimentsChanged( 274 virtual void OnExperimentsChanged(
275 const csync::Experiments& experiments) OVERRIDE; 275 const syncer::Experiments& experiments) OVERRIDE;
276 virtual void OnActionableError( 276 virtual void OnActionableError(
277 const csync::SyncProtocolError& error) OVERRIDE; 277 const syncer::SyncProtocolError& error) OVERRIDE;
278 278
279 // Update the last auth error and notify observers of error state. 279 // Update the last auth error and notify observers of error state.
280 void UpdateAuthErrorState(const GoogleServiceAuthError& error); 280 void UpdateAuthErrorState(const GoogleServiceAuthError& error);
281 281
282 // Called when a user chooses which data types to sync as part of the sync 282 // Called when a user chooses which data types to sync as part of the sync
283 // setup wizard. |sync_everything| represents whether they chose the 283 // setup wizard. |sync_everything| represents whether they chose the
284 // "keep everything synced" option; if true, |chosen_types| will be ignored 284 // "keep everything synced" option; if true, |chosen_types| will be ignored
285 // and all data types will be synced. |sync_everything| means "sync all 285 // and all data types will be synced. |sync_everything| means "sync all
286 // current and future data types." 286 // current and future data types."
287 virtual void OnUserChoseDatatypes(bool sync_everything, 287 virtual void OnUserChoseDatatypes(bool sync_everything,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return unrecoverable_error_location_; 326 return unrecoverable_error_location_;
327 } 327 }
328 328
329 // Returns true if OnPassphraseRequired has been called for any reason. 329 // Returns true if OnPassphraseRequired has been called for any reason.
330 virtual bool IsPassphraseRequired() const; 330 virtual bool IsPassphraseRequired() const;
331 331
332 // Returns true if OnPassphraseRequired has been called for decryption and 332 // Returns true if OnPassphraseRequired has been called for decryption and
333 // we have an encrypted data type enabled. 333 // we have an encrypted data type enabled.
334 virtual bool IsPassphraseRequiredForDecryption() const; 334 virtual bool IsPassphraseRequiredForDecryption() const;
335 335
336 csync::PassphraseRequiredReason passphrase_required_reason() const { 336 syncer::PassphraseRequiredReason passphrase_required_reason() const {
337 return passphrase_required_reason_; 337 return passphrase_required_reason_;
338 } 338 }
339 339
340 // Returns a user-friendly string form of last synced time (in minutes). 340 // Returns a user-friendly string form of last synced time (in minutes).
341 virtual string16 GetLastSyncedTimeString() const; 341 virtual string16 GetLastSyncedTimeString() const;
342 342
343 ProfileSyncComponentsFactory* factory() { return factory_.get(); } 343 ProfileSyncComponentsFactory* factory() { return factory_.get(); }
344 344
345 // The profile we are syncing for. 345 // The profile we are syncing for.
346 Profile* profile() const { return profile_; } 346 Profile* profile() const { return profile_; }
347 347
348 // Adds/removes an observer. ProfileSyncService does not take ownership of 348 // Adds/removes an observer. ProfileSyncService does not take ownership of
349 // the observer. 349 // the observer.
350 virtual void AddObserver(Observer* observer); 350 virtual void AddObserver(Observer* observer);
351 virtual void RemoveObserver(Observer* observer); 351 virtual void RemoveObserver(Observer* observer);
352 352
353 // Returns true if |observer| has already been added as an observer. 353 // Returns true if |observer| has already been added as an observer.
354 bool HasObserver(Observer* observer) const; 354 bool HasObserver(Observer* observer) const;
355 355
356 // Returns a weak pointer to the service's JsController. 356 // Returns a weak pointer to the service's JsController.
357 // Overrideable for testing purposes. 357 // Overrideable for testing purposes.
358 virtual base::WeakPtr<csync::JsController> GetJsController(); 358 virtual base::WeakPtr<syncer::JsController> GetJsController();
359 359
360 // Record stats on various events. 360 // Record stats on various events.
361 static void SyncEvent(SyncEventCodes code); 361 static void SyncEvent(SyncEventCodes code);
362 362
363 // Returns whether sync is enabled. Sync can be enabled/disabled both 363 // Returns whether sync is enabled. Sync can be enabled/disabled both
364 // at compile time (e.g., on a per-OS basis) or at run time (e.g., 364 // at compile time (e.g., on a per-OS basis) or at run time (e.g.,
365 // command-line switches). 365 // command-line switches).
366 static bool IsSyncEnabled(); 366 static bool IsSyncEnabled();
367 367
368 // Returns whether sync is managed, i.e. controlled by configuration 368 // Returns whether sync is managed, i.e. controlled by configuration
369 // management. If so, the user is not allowed to configure sync. 369 // management. If so, the user is not allowed to configure sync.
370 bool IsManaged() const; 370 bool IsManaged() const;
371 371
372 // csync::UnrecoverableErrorHandler implementation. 372 // syncer::UnrecoverableErrorHandler implementation.
373 virtual void OnUnrecoverableError( 373 virtual void OnUnrecoverableError(
374 const tracked_objects::Location& from_here, 374 const tracked_objects::Location& from_here,
375 const std::string& message) OVERRIDE; 375 const std::string& message) OVERRIDE;
376 376
377 // Called when a datatype wishes to disable itself due to having hit an 377 // Called when a datatype wishes to disable itself due to having hit an
378 // unrecoverable error. 378 // unrecoverable error.
379 virtual void DisableBrokenDatatype( 379 virtual void DisableBrokenDatatype(
380 syncable::ModelType type, 380 syncable::ModelType type,
381 const tracked_objects::Location& from_here, 381 const tracked_objects::Location& from_here,
382 std::string message); 382 std::string message);
383 383
384 // The functions below (until ActivateDataType()) should only be 384 // The functions below (until ActivateDataType()) should only be
385 // called if sync_initialized() is true. 385 // called if sync_initialized() is true.
386 386
387 // TODO(akalin): This is called mostly by ModelAssociators and 387 // TODO(akalin): This is called mostly by ModelAssociators and
388 // tests. Figure out how to pass the handle to the ModelAssociators 388 // tests. Figure out how to pass the handle to the ModelAssociators
389 // directly, figure out how to expose this to tests, and remove this 389 // directly, figure out how to expose this to tests, and remove this
390 // function. 390 // function.
391 virtual csync::UserShare* GetUserShare() const; 391 virtual syncer::UserShare* GetUserShare() const;
392 392
393 // TODO(akalin): These two functions are used only by 393 // TODO(akalin): These two functions are used only by
394 // ProfileSyncServiceHarness. Figure out a different way to expose 394 // ProfileSyncServiceHarness. Figure out a different way to expose
395 // this info to that class, and remove these functions. 395 // this info to that class, and remove these functions.
396 396
397 virtual csync::sessions::SyncSessionSnapshot 397 virtual syncer::sessions::SyncSessionSnapshot
398 GetLastSessionSnapshot() const; 398 GetLastSessionSnapshot() const;
399 399
400 // Returns whether or not the underlying sync engine has made any 400 // Returns whether or not the underlying sync engine has made any
401 // local changes to items that have not yet been synced with the 401 // local changes to items that have not yet been synced with the
402 // server. 402 // server.
403 bool HasUnsyncedItems() const; 403 bool HasUnsyncedItems() const;
404 404
405 // Used by ProfileSyncServiceHarness. May return NULL. 405 // Used by ProfileSyncServiceHarness. May return NULL.
406 browser_sync::BackendMigrator* GetBackendMigratorForTest(); 406 browser_sync::BackendMigrator* GetBackendMigratorForTest();
407 407
408 // Get the current routing information for all enabled model types. 408 // Get the current routing information for all enabled model types.
409 // If a model type is not enabled (that is, if the syncer should not 409 // If a model type is not enabled (that is, if the syncer should not
410 // be trying to sync it), it is not in this map. 410 // be trying to sync it), it is not in this map.
411 // 411 //
412 // TODO(akalin): This function is used by 412 // TODO(akalin): This function is used by
413 // sync_ui_util::ConstructAboutInformation() and by some test 413 // sync_ui_util::ConstructAboutInformation() and by some test
414 // classes. Figure out a different way to expose this info and 414 // classes. Figure out a different way to expose this info and
415 // remove this function. 415 // remove this function.
416 void GetModelSafeRoutingInfo( 416 void GetModelSafeRoutingInfo(
417 csync::ModelSafeRoutingInfo* out) const; 417 syncer::ModelSafeRoutingInfo* out) const;
418 418
419 // Overridden by tests. 419 // Overridden by tests.
420 // TODO(zea): Remove these and have the dtc's call directly into the SBH. 420 // TODO(zea): Remove these and have the dtc's call directly into the SBH.
421 virtual void ActivateDataType( 421 virtual void ActivateDataType(
422 syncable::ModelType type, csync::ModelSafeGroup group, 422 syncable::ModelType type, syncer::ModelSafeGroup group,
423 browser_sync::ChangeProcessor* change_processor); 423 browser_sync::ChangeProcessor* change_processor);
424 virtual void DeactivateDataType(syncable::ModelType type); 424 virtual void DeactivateDataType(syncable::ModelType type);
425 425
426 // SyncPrefObserver implementation. 426 // SyncPrefObserver implementation.
427 virtual void OnSyncManagedPrefChange(bool is_sync_managed) OVERRIDE; 427 virtual void OnSyncManagedPrefChange(bool is_sync_managed) OVERRIDE;
428 428
429 // content::NotificationObserver implementation. 429 // content::NotificationObserver implementation.
430 virtual void Observe(int type, 430 virtual void Observe(int type,
431 const content::NotificationSource& source, 431 const content::NotificationSource& source,
432 const content::NotificationDetails& details) OVERRIDE; 432 const content::NotificationDetails& details) OVERRIDE;
(...skipping 13 matching lines...) Expand all
446 // Gets the set of all data types that could be allowed (the set that 446 // Gets the set of all data types that could be allowed (the set that
447 // should be advertised to the user). These will typically only change 447 // should be advertised to the user). These will typically only change
448 // via a command-line option. See class comment for more on what it means 448 // via a command-line option. See class comment for more on what it means
449 // for a datatype to be Registered. 449 // for a datatype to be Registered.
450 virtual syncable::ModelTypeSet GetRegisteredDataTypes() const; 450 virtual syncable::ModelTypeSet GetRegisteredDataTypes() const;
451 451
452 // Checks whether the Cryptographer is ready to encrypt and decrypt updates 452 // Checks whether the Cryptographer is ready to encrypt and decrypt updates
453 // for sensitive data types. Caller must be holding a 453 // for sensitive data types. Caller must be holding a
454 // syncapi::BaseTransaction to ensure thread safety. 454 // syncapi::BaseTransaction to ensure thread safety.
455 virtual bool IsCryptographerReady( 455 virtual bool IsCryptographerReady(
456 const csync::BaseTransaction* trans) const; 456 const syncer::BaseTransaction* trans) const;
457 457
458 // Returns true if a secondary passphrase is being used. It is not legal 458 // Returns true if a secondary passphrase is being used. It is not legal
459 // to call this method before the backend is initialized. 459 // to call this method before the backend is initialized.
460 virtual bool IsUsingSecondaryPassphrase() const; 460 virtual bool IsUsingSecondaryPassphrase() const;
461 461
462 // Note about setting passphrases: There are different scenarios under which 462 // Note about setting passphrases: There are different scenarios under which
463 // we might want to apply a passphrase. It could be for first-time encryption, 463 // we might want to apply a passphrase. It could be for first-time encryption,
464 // re-encryption, or for decryption by clients that sign in at a later time. 464 // re-encryption, or for decryption by clients that sign in at a later time.
465 // In addition, encryption can either be done using a custom passphrase, or by 465 // In addition, encryption can either be done using a custom passphrase, or by
466 // reusing the GAIA password. Depending on what is happening in the system, 466 // reusing the GAIA password. Depending on what is happening in the system,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 // Helper to install and configure a data type manager. 540 // Helper to install and configure a data type manager.
541 void ConfigureDataTypeManager(); 541 void ConfigureDataTypeManager();
542 542
543 // Starts up the backend sync components. 543 // Starts up the backend sync components.
544 void StartUp(); 544 void StartUp();
545 // Shuts down the backend sync components. 545 // Shuts down the backend sync components.
546 // |sync_disabled| indicates if syncing is being disabled or not. 546 // |sync_disabled| indicates if syncing is being disabled or not.
547 void ShutdownImpl(bool sync_disabled); 547 void ShutdownImpl(bool sync_disabled);
548 548
549 // Return SyncCredentials from the TokenService. 549 // Return SyncCredentials from the TokenService.
550 csync::SyncCredentials GetCredentials(); 550 syncer::SyncCredentials GetCredentials();
551 551
552 // Test need to override this to create backends that allow setting up 552 // Test need to override this to create backends that allow setting up
553 // initial conditions, such as populating sync nodes. 553 // initial conditions, such as populating sync nodes.
554 // 554 //
555 // TODO(akalin): Figure out a better way to do this. Ideally, we'd 555 // TODO(akalin): Figure out a better way to do this. Ideally, we'd
556 // construct the backend outside this class and pass it in to the 556 // construct the backend outside this class and pass it in to the
557 // contructor or Initialize(). 557 // contructor or Initialize().
558 virtual void CreateBackend(); 558 virtual void CreateBackend();
559 559
560 const browser_sync::DataTypeController::TypeMap& data_type_controllers() { 560 const browser_sync::DataTypeController::TypeMap& data_type_controllers() {
(...skipping 16 matching lines...) Expand all
577 // user. 577 // user.
578 GoogleServiceAuthError last_auth_error_; 578 GoogleServiceAuthError last_auth_error_;
579 579
580 // Our asynchronous backend to communicate with sync components living on 580 // Our asynchronous backend to communicate with sync components living on
581 // other threads. 581 // other threads.
582 scoped_ptr<browser_sync::SyncBackendHost> backend_; 582 scoped_ptr<browser_sync::SyncBackendHost> backend_;
583 583
584 // Was the last SYNC_PASSPHRASE_REQUIRED notification sent because it 584 // Was the last SYNC_PASSPHRASE_REQUIRED notification sent because it
585 // was required for encryption, decryption with a cached passphrase, or 585 // was required for encryption, decryption with a cached passphrase, or
586 // because a new passphrase is required? 586 // because a new passphrase is required?
587 csync::PassphraseRequiredReason passphrase_required_reason_; 587 syncer::PassphraseRequiredReason passphrase_required_reason_;
588 588
589 private: 589 private:
590 enum UnrecoverableErrorReason { 590 enum UnrecoverableErrorReason {
591 ERROR_REASON_UNSET, 591 ERROR_REASON_UNSET,
592 ERROR_REASON_SYNCER, 592 ERROR_REASON_SYNCER,
593 ERROR_REASON_BACKEND_INIT_FAILURE, 593 ERROR_REASON_BACKEND_INIT_FAILURE,
594 ERROR_REASON_CONFIGURATION_RETRY, 594 ERROR_REASON_CONFIGURATION_RETRY,
595 ERROR_REASON_CONFIGURATION_FAILURE, 595 ERROR_REASON_CONFIGURATION_FAILURE,
596 ERROR_REASON_ACTIONABLE_ERROR, 596 ERROR_REASON_ACTIONABLE_ERROR,
597 ERROR_REASON_LIMIT 597 ERROR_REASON_LIMIT
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // Information describing an unrecoverable error. 721 // Information describing an unrecoverable error.
722 UnrecoverableErrorReason unrecoverable_error_reason_; 722 UnrecoverableErrorReason unrecoverable_error_reason_;
723 std::string unrecoverable_error_message_; 723 std::string unrecoverable_error_message_;
724 tracked_objects::Location unrecoverable_error_location_; 724 tracked_objects::Location unrecoverable_error_location_;
725 725
726 // Manages the start and stop of the various data types. 726 // Manages the start and stop of the various data types.
727 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; 727 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_;
728 728
729 ObserverList<Observer> observers_; 729 ObserverList<Observer> observers_;
730 730
731 csync::SyncJsController sync_js_controller_; 731 syncer::SyncJsController sync_js_controller_;
732 732
733 content::NotificationRegistrar registrar_; 733 content::NotificationRegistrar registrar_;
734 734
735 base::WeakPtrFactory<ProfileSyncService> weak_factory_; 735 base::WeakPtrFactory<ProfileSyncService> weak_factory_;
736 736
737 // This allows us to gracefully handle an ABORTED return code from the 737 // This allows us to gracefully handle an ABORTED return code from the
738 // DataTypeManager in the event that the server informed us to cease and 738 // DataTypeManager in the event that the server informed us to cease and
739 // desist syncing immediately. 739 // desist syncing immediately.
740 bool expect_sync_configuration_aborted_; 740 bool expect_sync_configuration_aborted_;
741 741
742 // Sometimes we need to temporarily hold on to a passphrase because we don't 742 // Sometimes we need to temporarily hold on to a passphrase because we don't
743 // yet have a backend to send it to. This happens during initialization as 743 // yet have a backend to send it to. This happens during initialization as
744 // we don't StartUp until we have a valid token, which happens after valid 744 // we don't StartUp until we have a valid token, which happens after valid
745 // credentials were provided. 745 // credentials were provided.
746 std::string cached_passphrase_; 746 std::string cached_passphrase_;
747 747
748 // The current set of encrypted types. Always a superset of 748 // The current set of encrypted types. Always a superset of
749 // csync::Cryptographer::SensitiveTypes(). 749 // syncer::Cryptographer::SensitiveTypes().
750 syncable::ModelTypeSet encrypted_types_; 750 syncable::ModelTypeSet encrypted_types_;
751 751
752 // Whether we want to encrypt everything. 752 // Whether we want to encrypt everything.
753 bool encrypt_everything_; 753 bool encrypt_everything_;
754 754
755 // Whether we're waiting for an attempt to encryption all sync data to 755 // Whether we're waiting for an attempt to encryption all sync data to
756 // complete. We track this at this layer in order to allow the user to cancel 756 // complete. We track this at this layer in order to allow the user to cancel
757 // if they e.g. don't remember their explicit passphrase. 757 // if they e.g. don't remember their explicit passphrase.
758 bool encryption_pending_; 758 bool encryption_pending_;
759 759
760 // If true, we want to automatically start sync signin whenever we have 760 // If true, we want to automatically start sync signin whenever we have
761 // credentials (user doesn't need to go through the startup flow). This is 761 // credentials (user doesn't need to go through the startup flow). This is
762 // typically enabled on platforms (like ChromeOS) that have their own 762 // typically enabled on platforms (like ChromeOS) that have their own
763 // distinct signin flow. 763 // distinct signin flow.
764 const bool auto_start_enabled_; 764 const bool auto_start_enabled_;
765 765
766 scoped_ptr<browser_sync::BackendMigrator> migrator_; 766 scoped_ptr<browser_sync::BackendMigrator> migrator_;
767 767
768 // This is the last |SyncProtocolError| we received from the server that had 768 // This is the last |SyncProtocolError| we received from the server that had
769 // an action set on it. 769 // an action set on it.
770 csync::SyncProtocolError last_actionable_error_; 770 syncer::SyncProtocolError last_actionable_error_;
771 771
772 // This is used to show sync errors in the wrench menu. 772 // This is used to show sync errors in the wrench menu.
773 scoped_ptr<SyncGlobalError> sync_global_error_; 773 scoped_ptr<SyncGlobalError> sync_global_error_;
774 774
775 // keeps track of data types that failed to load. 775 // keeps track of data types that failed to load.
776 FailedDatatypesHandler failed_datatypes_handler_; 776 FailedDatatypesHandler failed_datatypes_handler_;
777 777
778 scoped_ptr<browser_sync::BackendUnrecoverableErrorHandler> 778 scoped_ptr<browser_sync::BackendUnrecoverableErrorHandler>
779 backend_unrecoverable_error_handler_; 779 backend_unrecoverable_error_handler_;
780 780
781 browser_sync::DataTypeManager::ConfigureStatus configure_status_; 781 browser_sync::DataTypeManager::ConfigureStatus configure_status_;
782 782
783 // If |true|, there is setup UI visible so we should not start downloading 783 // If |true|, there is setup UI visible so we should not start downloading
784 // data types. 784 // data types.
785 bool setup_in_progress_; 785 bool setup_in_progress_;
786 786
787 // The set of currently enabled sync experiments. 787 // The set of currently enabled sync experiments.
788 csync::Experiments current_experiments; 788 syncer::Experiments current_experiments;
789 789
790 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 790 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
791 }; 791 };
792 792
793 bool ShouldShowActionOnUI( 793 bool ShouldShowActionOnUI(
794 const csync::SyncProtocolError& error); 794 const syncer::SyncProtocolError& error);
795 795
796 796
797 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 797 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698