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

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

Issue 6902101: Refactor sync passphrase setup flow and fix passphrase tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 cba3c7c3dd0ed46af57f317c64d5f8daca4aab5b..e2c1d0f8a043ae17675f0fada8350180500bca96 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -116,7 +116,10 @@ MessageType GetStatusInfo(ProfileSyncService* service,
}
result_type = PRE_SYNCED;
} else if (service->observed_passphrase_required()) {
- if (service->passphrase_required_for_decryption()) {
+ if (service->passphrase_required_reason() ==
+ sync_api::REASON_DECRYPTION ||
+ service->passphrase_required_reason() ==
+ sync_api::REASON_SET_PASSPHRASE_FAILED) {
// NOT first machine.
// Show a link ("needs attention"), but still indicate the
// current synced status. Return SYNC_PROMO so that
@@ -188,7 +191,9 @@ MessageType GetStatusInfoForNewTabPage(ProfileSyncService* service,
if (service->HasSyncSetupCompleted() &&
service->observed_passphrase_required()) {
- if (!service->passphrase_required_for_decryption()) {
+ if (service->passphrase_required_reason() != sync_api::REASON_DECRYPTION &&
+ service->passphrase_required_reason() !=
+ sync_api::REASON_SET_PASSPHRASE_FAILED) {
// First machine migrating to passwords. Show as a promotion.
if (status_label && link_label) {
status_label->assign(

Powered by Google App Engine
This is Rietveld 408576698