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

Unified Diff: chrome/browser/sync/profile_sync_service.h

Issue 6910012: Add method IsPassphraseRequiredForDecryption to ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/profile_sync_service.h
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index a0e1cb89e3f2917a031115bc9ecaf051d9e0dd87..b232563cd5ddf77ed6d467a33979484edd769f12 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -283,11 +283,22 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
}
// Returns true if OnPassphraseRequired has been called for any reason.
- bool ObservedPassphraseRequired() const {
+ bool IsPassphraseRequired() const {
return passphrase_required_reason_ !=
sync_api::REASON_PASSPHRASE_NOT_REQUIRED;
}
+ // Returns true if OnPassphraseRequired has been called for decryption.
+ bool IsPassphraseRequiredForDecryption() const {
+ return (passphrase_required_reason_ == sync_api::REASON_DECRYPTION ||
+ passphrase_required_reason_ == sync_api::REASON_SET_PASSPHRASE_FAILED);
+ }
+
+ // Returns true if OnPassphraseRequired has been called for encryption.
+ 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.
+ return passphrase_required_reason_ == sync_api::REASON_ENCRYPTION;
+ }
+
sync_api::PassphraseRequiredReason passphrase_required_reason() const {
return passphrase_required_reason_;
}
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | chrome/browser/sync/profile_sync_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698