Index: chrome/browser/browsing_data/browsing_data_remover.h |
diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h |
index 9e12be054b20b9017f3bf3c858329eb5e34f4cd3..1b302762e35a031dcc731f37df3fc3267f933224 100644 |
--- a/chrome/browser/browsing_data/browsing_data_remover.h |
+++ b/chrome/browser/browsing_data/browsing_data_remover.h |
@@ -170,6 +170,7 @@ class BrowsingDataRemover : public KeyedService |
struct TimeRange { |
TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {} |
+ bool operator==(const TimeRange& other) const; |
base::Time begin; |
base::Time end; |
@@ -241,10 +242,10 @@ class BrowsingDataRemover : public KeyedService |
// TODO(dmurph): Support all backends with filter (crbug.com/113621). |
// DO NOT USE THIS METHOD UNLESS CALLER KNOWS WHAT THEY'RE DOING. NOT ALL |
// BACKENDS ARE SUPPORTED YET, AND MORE DATA THAN EXPECTED COULD BE DELETED. |
- void RemoveWithFilter(const TimeRange& time_range, |
- int remove_mask, |
- int origin_type_mask, |
- const BrowsingDataFilterBuilder& origin_filter); |
+ virtual void RemoveWithFilter(const TimeRange& time_range, |
+ int remove_mask, |
+ int origin_type_mask, |
+ const BrowsingDataFilterBuilder& origin_filter); |
void AddObserver(Observer* observer); |
void RemoveObserver(Observer* observer); |
@@ -258,6 +259,12 @@ class BrowsingDataRemover : public KeyedService |
std::unique_ptr<WebappRegistry> webapp_registry); |
#endif |
+ protected: |
+ // Use BrowsingDataRemoverFactory::GetForBrowserContext to get an instance of |
+ // this class. The constructor is protected so that the class is mockable. |
+ BrowsingDataRemover(content::BrowserContext* browser_context); |
+ ~BrowsingDataRemover() override; |
+ |
private: |
// The clear API needs to be able to toggle removing_ in order to test that |
// only one BrowsingDataRemover instance can be called at a time. |
@@ -286,11 +293,6 @@ class BrowsingDataRemover : public KeyedService |
bool(const ContentSettingsPattern& primary_pattern, |
const ContentSettingsPattern& secondary_pattern)>& predicate); |
- // Use BrowsingDataRemoverFactory::GetForBrowserContext to get an instance of |
- // this class. |
- BrowsingDataRemover(content::BrowserContext* browser_context); |
- ~BrowsingDataRemover() override; |
- |
void Shutdown() override; |
// Setter for |is_removing_|; DCHECKs that we can only start removing if we're |