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

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

Issue 2816723002: Add "Site Settings" option to Clear Browsing Data on Android (Closed)
Patch Set: fix deps 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..12fd8ae2a0b7255cc1d6b1bdc76562758a260cb2 100644
--- a/components/browsing_data/core/browsing_data_utils.cc
+++ b/components/browsing_data/core/browsing_data_utils.cc
@@ -90,6 +90,12 @@ base::string16 GetCounterTextFromResult(
static_cast<const BrowsingDataCounter::FinishedResult*>(result)
->Value();
text = l10n_util::GetPluralStringFUTF16(IDS_DEL_DOWNLOADS_COUNTER, count);
+ } else if (pref_name == prefs::kDeleteSiteSettings) {
+ BrowsingDataCounter::ResultInt count =
+ static_cast<const BrowsingDataCounter::FinishedResult*>(result)
+ ->Value();
+ text =
+ l10n_util::GetPluralStringFUTF16(IDS_DEL_SITE_SETTINGS_COUNTER, count);
} else if (pref_name == prefs::kDeleteBrowsingHistoryBasic) {
// The basic tab doesn't show history counter results.
NOTREACHED();
@@ -226,6 +232,9 @@ bool GetDeletionPreferenceFromDataType(
// Bookmarks are deleted on the Android side. No corresponding deletion
// preference.
return false;
+ case BrowsingDataType::SITE_SETTINGS:
+ *out_pref = prefs::kDeleteSiteSettings;
+ return true;
case BrowsingDataType::NUM_TYPES:
// This is not an actual type.
NOTREACHED();
« no previous file with comments | « components/browsing_data/core/browsing_data_utils.h ('k') | components/browsing_data/core/counters/site_settings_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698