Index: components/browsing_data/core/browsing_data_utils.h |
diff --git a/components/browsing_data/core/browsing_data_utils.h b/components/browsing_data/core/browsing_data_utils.h |
index db0d7c2ce912f4d0be1e6d92db26c616f35323e4..97cc7b1273ece43739b2b3d36a1f5c9fbe0711ea 100644 |
--- a/components/browsing_data/core/browsing_data_utils.h |
+++ b/components/browsing_data/core/browsing_data_utils.h |
@@ -7,6 +7,7 @@ |
#include "base/strings/string16.h" |
#include "base/time/time.h" |
+#include "components/browsing_data/core/clear_browsing_data_tab.h" |
#include "components/browsing_data/core/counters/browsing_data_counter.h" |
namespace browsing_data { |
@@ -17,7 +18,7 @@ namespace browsing_data { |
// |
// A Java counterpart will be generated for this enum. |
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.browsing_data |
-enum BrowsingDataType { |
+enum class BrowsingDataType { |
HISTORY, |
CACHE, |
COOKIES, |
@@ -31,7 +32,7 @@ enum BrowsingDataType { |
// |
// A Java counterpart will be generated for this enum. |
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.browsing_data |
-enum TimePeriod { |
+enum class TimePeriod { |
LAST_HOUR = 0, |
LAST_DAY, |
LAST_WEEK, |
@@ -53,14 +54,24 @@ void RecordDeletionForPeriod(TimePeriod time_period); |
// Currently this can only be used for counters for which the Result is defined |
// in components/browsing_data/core/counters. |
base::string16 GetCounterTextFromResult( |
- const browsing_data::BrowsingDataCounter::Result* result); |
+ const BrowsingDataCounter::Result* result); |
+ |
+// Returns the preference that stores the time period. |
+const char* GetTimePeriodPreferenceName( |
+ ClearBrowsingDataTab clear_browsing_data_tab); |
// Copies the name of the deletion preference corresponding to the given |
// |data_type| to |out_pref|. Returns false if no such preference exists. |
bool GetDeletionPreferenceFromDataType( |
BrowsingDataType data_type, |
+ ClearBrowsingDataTab clear_browsing_data_tab, |
std::string* out_pref); |
+// Copies the deletion preferences for timeperiod, cache, history and cookies |
+// to a separate preferences that are used to on the basic CBD tab. |
+// This only happens the first time this method is called. |
+void MigratePreferencesToBasic(PrefService* prefs); |
+ |
} // namespace browsing_data |
#endif // COMPONENTS_BROWSING_DATA_CORE_BROWSING_DATA_UTILS_H_ |