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

Unified Diff: components/browsing_data/core/browsing_data_utils.cc

Issue 2828083003: Show autofill sync status in CBD (Closed)
Patch Set: fix history test Created 3 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: components/browsing_data/core/browsing_data_utils.cc
diff --git a/components/browsing_data/core/browsing_data_utils.cc b/components/browsing_data/core/browsing_data_utils.cc
index e3459aa5b93fa24c3272dab2b7760d6dc81f1f05..15fd762c27d6488adf23a2ae20722aa0f29fd1a5 100644
--- a/components/browsing_data/core/browsing_data_utils.cc
+++ b/components/browsing_data/core/browsing_data_utils.cc
@@ -145,23 +145,30 @@ base::string16 GetCounterTextFromResult(
}
}
+ bool synced = autofill_result->autofill_sync_enabled();
+
// Construct the resulting string from the sections in |displayed_strings|.
switch (displayed_strings.size()) {
case 0:
text = l10n_util::GetStringUTF16(IDS_DEL_AUTOFILL_COUNTER_EMPTY);
break;
case 1:
- text = displayed_strings[0];
+ text = synced ? l10n_util::GetStringFUTF16(
+ IDS_DEL_AUTOFILL_COUNTER_ONE_TYPE_SYNCED,
+ displayed_strings[0])
+ : displayed_strings[0];
break;
case 2:
- text = l10n_util::GetStringFUTF16(IDS_DEL_AUTOFILL_COUNTER_TWO_TYPES,
- displayed_strings[0],
- displayed_strings[1]);
+ text = l10n_util::GetStringFUTF16(
+ synced ? IDS_DEL_AUTOFILL_COUNTER_TWO_TYPES_SYNCED
+ : IDS_DEL_AUTOFILL_COUNTER_TWO_TYPES,
+ displayed_strings[0], displayed_strings[1]);
break;
case 3:
text = l10n_util::GetStringFUTF16(
- IDS_DEL_AUTOFILL_COUNTER_THREE_TYPES, displayed_strings[0],
- displayed_strings[1], displayed_strings[2]);
+ synced ? IDS_DEL_AUTOFILL_COUNTER_THREE_TYPES_SYNCED
+ : IDS_DEL_AUTOFILL_COUNTER_THREE_TYPES,
+ displayed_strings[0], displayed_strings[1], displayed_strings[2]);
break;
default:
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698