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

Unified Diff: chrome/browser/sync/sync_ui_util.cc

Issue 6910012: Add method IsPassphraseRequiredForDecryption to ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-enable failing test. 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/sync_ui_util.cc
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index e894e1b79a175d094a968c1a5524b6cbe32410eb..989a99601dddaf62983bec5404baa5ec4a34d3b3 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -103,7 +103,7 @@ MessageType GetStatusInfo(ProfileSyncService* service,
// Either show auth error information with a link to re-login, auth in prog,
// or note that everything is OK with the last synced time.
- if (status.authenticated && !service->ObservedPassphraseRequired()) {
+ if (status.authenticated && !service->IsPassphraseRequired()) {
// Everything is peachy.
if (status_label) {
status_label->assign(GetSyncedStateStatusLabel(service));
@@ -115,11 +115,8 @@ MessageType GetStatusInfo(ProfileSyncService* service,
l10n_util::GetStringUTF16(IDS_SYNC_AUTHENTICATING_LABEL));
}
result_type = PRE_SYNCED;
- } else if (service->ObservedPassphraseRequired()) {
- if (service->passphrase_required_reason() ==
- sync_api::REASON_DECRYPTION ||
- service->passphrase_required_reason() ==
- sync_api::REASON_SET_PASSPHRASE_FAILED) {
+ } else if (service->IsPassphraseRequired()) {
+ if (service->IsPassphraseRequiredForDecryption()) {
// NOT first machine.
// Show a link ("needs attention"), but still indicate the
// current synced status. Return SYNC_PROMO so that
@@ -190,7 +187,7 @@ MessageType GetStatusInfoForNewTabPage(ProfileSyncService* service,
DCHECK(link_label);
if (service->HasSyncSetupCompleted() &&
- service->ObservedPassphraseRequired()) {
+ service->IsPassphraseRequired()) {
if (service->passphrase_required_reason() == sync_api::REASON_ENCRYPTION) {
// First machine migrating to passwords. Show as a promotion.
if (status_label && link_label) {
« no previous file with comments | « chrome/browser/sync/profile_sync_service_harness.cc ('k') | chrome/test/live_sync/two_client_live_passwords_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698