Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 const browser_sync::WeakHandle<browser_sync::JsBackend>& js_backend, | 202 const browser_sync::WeakHandle<browser_sync::JsBackend>& js_backend, |
| 203 bool success) OVERRIDE; | 203 bool success) OVERRIDE; |
| 204 virtual void OnSyncCycleCompleted() OVERRIDE; | 204 virtual void OnSyncCycleCompleted() OVERRIDE; |
| 205 virtual void OnAuthError() OVERRIDE; | 205 virtual void OnAuthError() OVERRIDE; |
| 206 virtual void OnStopSyncingPermanently() OVERRIDE; | 206 virtual void OnStopSyncingPermanently() OVERRIDE; |
| 207 virtual void OnClearServerDataFailed() OVERRIDE; | 207 virtual void OnClearServerDataFailed() OVERRIDE; |
| 208 virtual void OnClearServerDataSucceeded() OVERRIDE; | 208 virtual void OnClearServerDataSucceeded() OVERRIDE; |
| 209 virtual void OnPassphraseRequired( | 209 virtual void OnPassphraseRequired( |
| 210 sync_api::PassphraseRequiredReason reason) OVERRIDE; | 210 sync_api::PassphraseRequiredReason reason) OVERRIDE; |
| 211 virtual void OnPassphraseAccepted() OVERRIDE; | 211 virtual void OnPassphraseAccepted() OVERRIDE; |
| 212 virtual void OnEncryptionComplete( | 212 virtual void OnEncryptedTypesChanged( |
| 213 const syncable::ModelTypeSet& encrypted_types) OVERRIDE; | 213 const syncable::ModelTypeSet& enncrypted_types, |
| 214 bool encrypt_everything) OVERRIDE; | |
| 215 virtual void OnEncryptionComplete() OVERRIDE; | |
| 214 virtual void OnMigrationNeededForTypes( | 216 virtual void OnMigrationNeededForTypes( |
| 215 const syncable::ModelTypeSet& types) OVERRIDE; | 217 const syncable::ModelTypeSet& types) OVERRIDE; |
| 216 virtual void OnDataTypesChanged( | 218 virtual void OnDataTypesChanged( |
| 217 const syncable::ModelTypeSet& to_add) OVERRIDE; | 219 const syncable::ModelTypeSet& to_add) OVERRIDE; |
| 218 virtual void OnActionableError( | 220 virtual void OnActionableError( |
| 219 const browser_sync::SyncProtocolError& error) OVERRIDE; | 221 const browser_sync::SyncProtocolError& error) OVERRIDE; |
| 220 | 222 |
| 221 void OnClearServerDataTimeout(); | 223 void OnClearServerDataTimeout(); |
| 222 | 224 |
| 223 // Called when a user enters credentials through UI. | 225 // Called when a user enters credentials through UI. |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 663 // Keep track of where we are in a server clear operation | 665 // Keep track of where we are in a server clear operation |
| 664 ClearServerDataState clear_server_data_state_; | 666 ClearServerDataState clear_server_data_state_; |
| 665 | 667 |
| 666 // Timeout for the clear data command. This timeout is a temporary hack | 668 // Timeout for the clear data command. This timeout is a temporary hack |
| 667 // and is necessary because the nudge sync framework can drop nudges for | 669 // and is necessary because the nudge sync framework can drop nudges for |
| 668 // a wide variety of sync-related conditions (throttling, connections issues, | 670 // a wide variety of sync-related conditions (throttling, connections issues, |
| 669 // syncer paused, etc.). It can only be removed correctly when the framework | 671 // syncer paused, etc.). It can only be removed correctly when the framework |
| 670 // is reworked to allow one-shot commands like clearing server data. | 672 // is reworked to allow one-shot commands like clearing server data. |
| 671 base::OneShotTimer<ProfileSyncService> clear_server_data_timer_; | 673 base::OneShotTimer<ProfileSyncService> clear_server_data_timer_; |
| 672 | 674 |
| 675 // The set of encrypted types and whether or not we want to encrypt | |
| 676 // everything. Initialized on OnBackendInitialized and updated by | |
|
Nicolas Zea
2011/10/21 14:29:07
Perhaps include a comment that the Cryptographer::
akalin
2011/10/22 03:28:38
Done.
| |
| 677 // OnEncryptionComplete. | |
| 678 syncable::ModelTypeSet encrypted_types_; | |
| 679 bool encrypt_everything_; | |
| 680 | |
| 673 // Whether we're waiting for an attempt to encryption all sync data to | 681 // Whether we're waiting for an attempt to encryption all sync data to |
| 674 // complete. We track this at this layer in order to allow the user to cancel | 682 // complete. We track this at this layer in order to allow the user to cancel |
| 675 // if they e.g. don't remember their explicit passphrase. | 683 // if they e.g. don't remember their explicit passphrase. |
| 676 bool encryption_pending_; | 684 bool encryption_pending_; |
| 677 | 685 |
| 678 // If true, we want to automatically start sync signin whenever we have | 686 // If true, we want to automatically start sync signin whenever we have |
| 679 // credentials (user doesn't need to go through the startup flow). This is | 687 // credentials (user doesn't need to go through the startup flow). This is |
| 680 // typically enabled on platforms (like ChromeOS) that have their own | 688 // typically enabled on platforms (like ChromeOS) that have their own |
| 681 // distinct signin flow. | 689 // distinct signin flow. |
| 682 bool auto_start_enabled_; | 690 bool auto_start_enabled_; |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 694 FailedDatatypesHandler failed_datatypes_handler_; | 702 FailedDatatypesHandler failed_datatypes_handler_; |
| 695 | 703 |
| 696 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 704 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 697 }; | 705 }; |
| 698 | 706 |
| 699 bool ShouldShowActionOnUI( | 707 bool ShouldShowActionOnUI( |
| 700 const browser_sync::SyncProtocolError& error); | 708 const browser_sync::SyncProtocolError& error); |
| 701 | 709 |
| 702 | 710 |
| 703 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 711 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |