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

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: Remove OnPassphraseFailed; Plumb enum all the way through; Shave yak. 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..cac1680c938bc5d8a39777f7f1c6080bde31ce29 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -116,7 +116,9 @@ 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::DECRYPTION ||
+ service->passphrase_required_reason() ==
+ sync_api::DECRYPTION_FAILED) {
// NOT first machine.
// Show a link ("needs attention"), but still indicate the
// current synced status. Return SYNC_PROMO so that
@@ -188,7 +190,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::DECRYPTION &&
+ service->passphrase_required_reason() ==
+ sync_api::DECRYPTION_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