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 current set of encrypted types. Always a superset of |
| 676 // Cryptographer::SensitiveTypes(). |
| 677 syncable::ModelTypeSet encrypted_types_; |
| 678 |
| 679 // Whether we want to encrypt everything. |
| 680 bool encrypt_everything_; |
| 681 |
673 // Whether we're waiting for an attempt to encryption all sync data to | 682 // 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 | 683 // 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. | 684 // if they e.g. don't remember their explicit passphrase. |
676 bool encryption_pending_; | 685 bool encryption_pending_; |
677 | 686 |
678 // If true, we want to automatically start sync signin whenever we have | 687 // 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 | 688 // credentials (user doesn't need to go through the startup flow). This is |
680 // typically enabled on platforms (like ChromeOS) that have their own | 689 // typically enabled on platforms (like ChromeOS) that have their own |
681 // distinct signin flow. | 690 // distinct signin flow. |
682 bool auto_start_enabled_; | 691 bool auto_start_enabled_; |
(...skipping 11 matching lines...) Expand all Loading... |
694 FailedDatatypesHandler failed_datatypes_handler_; | 703 FailedDatatypesHandler failed_datatypes_handler_; |
695 | 704 |
696 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 705 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
697 }; | 706 }; |
698 | 707 |
699 bool ShouldShowActionOnUI( | 708 bool ShouldShowActionOnUI( |
700 const browser_sync::SyncProtocolError& error); | 709 const browser_sync::SyncProtocolError& error); |
701 | 710 |
702 | 711 |
703 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 712 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |