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

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

Issue 2855623005: Move browsing_data counter sync tests to separate file (Closed)
Patch Set: remove HistoryResult and PasswordResult Created 3 years, 7 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 15fd762c27d6488adf23a2ae20722aa0f29fd1a5..02175b041175b8f5ca71f84f897096049349191e 100644
--- a/components/browsing_data/core/browsing_data_utils.cc
+++ b/components/browsing_data/core/browsing_data_utils.cc
@@ -75,15 +75,14 @@ base::string16 GetCounterTextFromResult(
text = l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_CALCULATING);
} else if (pref_name == prefs::kDeletePasswords) {
- const PasswordsCounter::PasswordResult* password_result =
- static_cast<const PasswordsCounter::PasswordResult*>(result);
+ const BrowsingDataCounter::SyncResult* password_result =
+ static_cast<const BrowsingDataCounter::SyncResult*>(result);
BrowsingDataCounter::ResultInt count = password_result->Value();
text = l10n_util::GetPluralStringFUTF16(
- password_result->password_sync_enabled()
- ? IDS_DEL_PASSWORDS_COUNTER_SYNCED
- : IDS_DEL_PASSWORDS_COUNTER,
+ password_result->IsSyncEnabled() ? IDS_DEL_PASSWORDS_COUNTER_SYNCED
+ : IDS_DEL_PASSWORDS_COUNTER,
count);
} else if (pref_name == prefs::kDeleteDownloadHistory) {
BrowsingDataCounter::ResultInt count =
@@ -95,10 +94,10 @@ base::string16 GetCounterTextFromResult(
NOTREACHED();
} else if (pref_name == prefs::kDeleteBrowsingHistory) {
// History counter.
- const HistoryCounter::HistoryResult* history_result =
- static_cast<const HistoryCounter::HistoryResult*>(result);
+ const BrowsingDataCounter::SyncResult* history_result =
+ static_cast<const BrowsingDataCounter::SyncResult*>(result);
BrowsingDataCounter::ResultInt local_item_count = history_result->Value();
- bool has_synced_visits = history_result->has_synced_visits();
+ bool has_synced_visits = history_result->IsSyncEnabled();
text = has_synced_visits
? l10n_util::GetPluralStringFUTF16(
IDS_DEL_BROWSING_HISTORY_COUNTER_SYNCED, local_item_count)
@@ -145,7 +144,7 @@ base::string16 GetCounterTextFromResult(
}
}
- bool synced = autofill_result->autofill_sync_enabled();
+ bool synced = autofill_result->IsSyncEnabled();
// Construct the resulting string from the sections in |displayed_strings|.
switch (displayed_strings.size()) {

Powered by Google App Engine
This is Rietveld 408576698