Chromium Code Reviews| 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 5a1e9f879cdc69e42903523f76d99839a1808261..d28af88cacc17fdf6c54e565dccba358225783a2 100644 |
| --- a/chrome/browser/browsing_data/browsing_data_remover.h |
| +++ b/chrome/browser/browsing_data/browsing_data_remover.h |
| @@ -116,15 +116,26 @@ class BrowsingDataRemover : public content::NotificationObserver, |
| virtual ~Observer() {} |
| }; |
| - // Creates a BrowsingDataRemover to remove browser data from the specified |
| - // profile in the specified time range. Use Remove to initiate the removal. |
| - BrowsingDataRemover(Profile* profile, base::Time delete_begin, |
| - base::Time delete_end); |
| + // Creates a BrowsingDataRemover object that removes data regardless of the |
| + // time it was last modified. |
| + static BrowsingDataRemover* CreateForUnboundedRange(Profile* profile); |
|
cbentzel
2012/08/29 01:53:13
Should these return scoped_ptr<BrowsingDataRemover
Mike West
2012/09/03 08:02:57
BrowsingDataRemover has very strange semantics, in
markusheintz_
2012/09/03 08:58:44
Maybe you should mention in the comment, that the
|
| - // Creates a BrowsingDataRemover to remove browser data from the specified |
| - // profile in the specified time range. |
| - BrowsingDataRemover(Profile* profile, TimePeriod time_period, |
| - base::Time delete_end); |
| + // Creates a BrowsingDataRemover object bound on both sides by a time. |
| + static BrowsingDataRemover* CreateForRange(Profile* profile, |
| + base::Time delete_begin, |
| + base::Time delete_end); |
| + |
| + // Creates a BrowsingDataRemover bound to a specific period of time (as |
| + // defined via a TimePeriod). |
| + static BrowsingDataRemover* CreateForPeriod(Profile* profile, |
| + TimePeriod deletionPeriod); |
|
jam
2012/08/28 16:13:04
nit: google style is deletion_period
Mike West
2012/09/03 08:02:57
Will do.
|
| + |
| + // Quota managed data uses a different bitmask for types than |
| + // BrowsingDataRemover uses. This method generates that mask. |
| + static int GenerateQuotaClientMask(int remove_mask); |
| + |
| + // Is the BrowsingDataRemover currently in the process of removing data? |
| + static bool is_removing() { return removing_; } |
|
jam
2012/08/28 16:13:04
nit: this should be beside the set_removing setter
Mike West
2012/09/03 08:02:57
Will do.
|
| // Removes the specified items related to browsing for all origins that match |
| // the provided |origin_set_mask| (see BrowsingDataHelper::OriginSetMask). |
| @@ -136,15 +147,9 @@ class BrowsingDataRemover : public content::NotificationObserver, |
| // Called when history deletion is done. |
| void OnHistoryDeletionDone(); |
| - // Quota managed data uses a different bitmask for types than |
| - // BrowsingDataRemover uses. This method generates that mask. |
| - static int GenerateQuotaClientMask(int remove_mask); |
| - |
| // Used for testing. |
| void OverrideQuotaManagerForTesting(quota::QuotaManager* quota_manager); |
| - static bool is_removing() { return removing_; } |
| - |
| 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. |
| @@ -167,6 +172,14 @@ class BrowsingDataRemover : public content::NotificationObserver, |
| STATE_DONE |
| }; |
| + // Calculate the begin time for the deletion range specified by |time_period|. |
| + static base::Time CalculateBeginDeleteTime(TimePeriod time_period); |
| + |
| + // Creates a BrowsingDataRemover to remove browser data from the specified |
| + // profile in the specified time range. Use Remove to initiate the removal. |
| + BrowsingDataRemover(Profile* profile, base::Time delete_begin, |
| + base::Time delete_end); |
| + |
| // BrowsingDataRemover deletes itself (using DeleteHelper) and is not supposed |
| // to be deleted by other objects so make destructor private and DeleteHelper |
| // a friend. |
| @@ -286,9 +299,6 @@ class BrowsingDataRemover : public content::NotificationObserver, |
| // Callback from the above method. |
| void OnClearedFormData(); |
| - // Calculate the begin time for the deletion range specified by |time_period|. |
| - base::Time CalculateBeginDeleteTime(TimePeriod time_period); |
| - |
| // Returns true if we're all done. |
| bool AllDone(); |