| Index: components/browsing_data/core/counters/browsing_data_counter.h
|
| diff --git a/components/browsing_data/core/counters/browsing_data_counter.h b/components/browsing_data/core/counters/browsing_data_counter.h
|
| index c2749364f539cabb9ae2e39b49f8650a696b11c9..53861d0a3d23b6cf8bce283f12b5070fcf4d00e0 100644
|
| --- a/components/browsing_data/core/counters/browsing_data_counter.h
|
| +++ b/components/browsing_data/core/counters/browsing_data_counter.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| +#include "components/browsing_data/core/browsing_data_enums.h"
|
| #include "components/prefs/pref_member.h"
|
|
|
| class PrefService;
|
| @@ -62,14 +63,14 @@ class BrowsingDataCounter {
|
| virtual ~BrowsingDataCounter();
|
|
|
| // Should be called once to initialize this class.
|
| - void Init(PrefService* pref_service, const Callback& callback);
|
| + void Init(PrefService* pref_service,
|
| + ClearBrowsingDataPreferenceType pref_type,
|
| + const Callback& callback);
|
|
|
| // Name of the preference associated with this counter.
|
| virtual const char* GetPrefName() const = 0;
|
|
|
| - // PrefService that manages the preferences for the user profile
|
| - // associated with this counter.
|
| - PrefService* GetPrefs() const;
|
| + const char* GetTimePeriodPrefName() const;
|
|
|
| // Restarts the counter. Will be called automatically if the counting needs
|
| // to be restarted, e.g. when the deletion preference changes state or when
|
| @@ -88,6 +89,10 @@ class BrowsingDataCounter {
|
| // Calculates the beginning of the counting period as |period_| before now.
|
| base::Time GetPeriodStart();
|
|
|
| + // Returns if this counter belongs to a preference on the default, basic or
|
| + // advanced CBD tab.
|
| + ClearBrowsingDataPreferenceType GetPrefType() const;
|
| +
|
| private:
|
| // Called after the class is initialized by calling |Init|.
|
| virtual void OnInitialized();
|
| @@ -95,9 +100,8 @@ class BrowsingDataCounter {
|
| // Count the data.
|
| virtual void Count() = 0;
|
|
|
| - // Pointer to the PrefService that manages the preferences for the user
|
| - // profile associated with this counter.
|
| - PrefService* pref_service_;
|
| + // Indicates if this counter belongs to a preference on the basic CBD tab.
|
| + ClearBrowsingDataPreferenceType pref_type_;
|
|
|
| // The callback that will be called when the UI should be updated with a new
|
| // counter value.
|
|
|