| 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 52b67d6362b13444cdbac5e84f6593d228bf78ea..fc53dbe59d26d7885403c0bd5eaf98a905f891e1 100644
|
| --- a/chrome/browser/browsing_data/browsing_data_remover.h
|
| +++ b/chrome/browser/browsing_data/browsing_data_remover.h
|
| @@ -144,28 +144,6 @@ class BrowsingDataRemover : public KeyedService
|
| MAX_CHOICE_VALUE
|
| };
|
|
|
| - // When BrowsingDataRemover successfully removes data, a notification of type
|
| - // NOTIFICATION_BROWSING_DATA_REMOVED is triggered with a Details object of
|
| - // this type.
|
| - struct NotificationDetails {
|
| - NotificationDetails();
|
| - NotificationDetails(const NotificationDetails& details);
|
| - NotificationDetails(base::Time removal_begin,
|
| - int removal_mask,
|
| - int origin_type_mask);
|
| - ~NotificationDetails();
|
| -
|
| - // The beginning of the removal time range.
|
| - base::Time removal_begin;
|
| -
|
| - // The removal mask (see the RemoveDataMask enum for details).
|
| - int removal_mask;
|
| -
|
| - // The origin type mask (see BrowsingDataHelper::OriginTypeMask for
|
| - // details).
|
| - int origin_type_mask;
|
| - };
|
| -
|
| struct TimeRange {
|
| TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {}
|
| bool operator==(const TimeRange& other) const;
|
| @@ -192,10 +170,6 @@ class BrowsingDataRemover : public KeyedService
|
| virtual ~Observer() {}
|
| };
|
|
|
| - using Callback = base::Callback<void(const NotificationDetails&)>;
|
| - using CallbackSubscription = std::unique_ptr<
|
| - base::CallbackList<void(const NotificationDetails&)>::Subscription>;
|
| -
|
| // The completion inhibitor can artificially delay completion of the browsing
|
| // data removal process. It is used during testing to simulate scenarios in
|
| // which the deletion stalls or takes a very long time.
|
| @@ -228,14 +202,6 @@ class BrowsingDataRemover : public KeyedService
|
| completion_inhibitor_ = inhibitor;
|
| }
|
|
|
| - // Add a callback to the list of callbacks to be called during a browsing data
|
| - // removal event. Returns a subscription object that can be used to
|
| - // un-register the callback.
|
| - // TODO(crbug.com/483528): Make this non-static and merge it with the Observer
|
| - // interface.
|
| - static CallbackSubscription RegisterOnBrowsingDataRemovedCallback(
|
| - const Callback& callback);
|
| -
|
| // Removes the specified items related to browsing for all origins that match
|
| // the provided |origin_type_mask| (see BrowsingDataHelper::OriginTypeMask).
|
| void Remove(const TimeRange& time_range,
|
| @@ -265,6 +231,14 @@ class BrowsingDataRemover : public KeyedService
|
| std::unique_ptr<WebappRegistry> webapp_registry);
|
| #endif
|
|
|
| + // Parameters of the last call are exposed to be used by tests.
|
| + // TODO(msramek): If other consumers than tests are interested in this,
|
| + // consider returning them in OnBrowsingDataRemoverDone() callback.
|
| + const base::Time& GetLastUsedBeginTime();
|
| + const base::Time& GetLastUsedEndTime();
|
| + int GetLastUsedRemovalMask();
|
| + int GetLastUsedOriginTypeMask();
|
| +
|
| protected:
|
| // Use BrowsingDataRemoverFactory::GetForBrowserContext to get an instance of
|
| // this class. The constructor is protected so that the class is mockable.
|
|
|