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

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

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: rebase and fix compilation Created 3 years, 10 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
« no previous file with comments | « components/browsing_data/core/DEPS ('k') | components/browsing_data/core/browsing_data_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « components/browsing_data/core/DEPS ('k') | components/browsing_data/core/browsing_data_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698