 Chromium Code Reviews
 Chromium Code Reviews Issue 6910012:
  Add method IsPassphraseRequiredForDecryption to ProfileSyncService  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 6910012:
  Add method IsPassphraseRequiredForDecryption to ProfileSyncService  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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 <string> | 9 #include <string> | 
| 10 | 10 | 
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 tracked_objects::Location unrecoverable_error_location() { | 276 tracked_objects::Location unrecoverable_error_location() { | 
| 277 return unrecoverable_error_location_.get() ? | 277 return unrecoverable_error_location_.get() ? | 
| 278 *unrecoverable_error_location_.get() : tracked_objects::Location(); | 278 *unrecoverable_error_location_.get() : tracked_objects::Location(); | 
| 279 } | 279 } | 
| 280 | 280 | 
| 281 bool UIShouldDepictAuthInProgress() const { | 281 bool UIShouldDepictAuthInProgress() const { | 
| 282 return is_auth_in_progress_; | 282 return is_auth_in_progress_; | 
| 283 } | 283 } | 
| 284 | 284 | 
| 285 // Returns true if OnPassphraseRequired has been called for any reason. | 285 // Returns true if OnPassphraseRequired has been called for any reason. | 
| 286 bool ObservedPassphraseRequired() const { | 286 bool IsPassphraseRequired() const { | 
| 287 return passphrase_required_reason_ != | 287 return passphrase_required_reason_ != | 
| 288 sync_api::REASON_PASSPHRASE_NOT_REQUIRED; | 288 sync_api::REASON_PASSPHRASE_NOT_REQUIRED; | 
| 289 } | 289 } | 
| 290 | 290 | 
| 291 // Returns true if OnPassphraseRequired has been called for decryption. | |
| 292 bool IsPassphraseRequiredForDecryption() const { | |
| 293 return (passphrase_required_reason_ == sync_api::REASON_DECRYPTION || | |
| 294 passphrase_required_reason_ == sync_api::REASON_SET_PASSPHRASE_FAILED); | |
| 295 } | |
| 296 | |
| 297 // Returns true if OnPassphraseRequired has been called for encryption. | |
| 298 bool IsPassphraseRequiredForEncryption() const { | |
| 
tim (not reviewing)
2011/05/03 00:06:59
I'm not sure this one is truly necessary / buys us
 
Raghu Simha
2011/05/03 00:24:00
Agreed, it doesn't. Removed.
 | |
| 299 return passphrase_required_reason_ == sync_api::REASON_ENCRYPTION; | |
| 300 } | |
| 301 | |
| 291 sync_api::PassphraseRequiredReason passphrase_required_reason() const { | 302 sync_api::PassphraseRequiredReason passphrase_required_reason() const { | 
| 292 return passphrase_required_reason_; | 303 return passphrase_required_reason_; | 
| 293 } | 304 } | 
| 294 | 305 | 
| 295 // Returns a user-friendly string form of last synced time (in minutes). | 306 // Returns a user-friendly string form of last synced time (in minutes). | 
| 296 virtual string16 GetLastSyncedTimeString() const; | 307 virtual string16 GetLastSyncedTimeString() const; | 
| 297 | 308 | 
| 298 // Returns the authenticated username of the sync user, or empty if none | 309 // Returns the authenticated username of the sync user, or empty if none | 
| 299 // exists. It will only exist if the authentication service provider (e.g | 310 // exists. It will only exist if the authentication service provider (e.g | 
| 300 // GAIA) has confirmed the username is authentic. | 311 // GAIA) has confirmed the username is authentic. | 
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 642 // The set of encrypted types. This is updated whenever datatypes are | 653 // The set of encrypted types. This is updated whenever datatypes are | 
| 643 // encrypted through the OnEncryptionComplete callback of SyncFrontend. | 654 // encrypted through the OnEncryptionComplete callback of SyncFrontend. | 
| 644 syncable::ModelTypeSet encrypted_types_; | 655 syncable::ModelTypeSet encrypted_types_; | 
| 645 | 656 | 
| 646 scoped_ptr<browser_sync::BackendMigrator> migrator_; | 657 scoped_ptr<browser_sync::BackendMigrator> migrator_; | 
| 647 | 658 | 
| 648 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 659 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 
| 649 }; | 660 }; | 
| 650 | 661 | 
| 651 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 662 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 
| OLD | NEW |