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..d1489b78d1e961fb6c24f5ec8e293f313f9195c8 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); |
- // 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 period); |
+ |
+ // 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 removing() { return removing_; } |
Bernhard Bauer
2012/09/03 09:29:25
Nit: If the style guide says that the accessor sho
|
// 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,18 @@ 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); |
+ |
+ // Setter for removing_; DCHECKs that we can only start removing if we're not |
Bernhard Bauer
2012/09/03 09:29:25
Nit: |removing_| in pipes please.
|
+ // already removing, and vice-versa. |
+ static void set_removing(bool removing); |
+ |
+ // 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, |
Bernhard Bauer
2012/09/03 09:29:25
Nit: If you're breaking parameter lists, put each
|
+ 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,16 +303,9 @@ 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(); |
- // Setter for removing_; DCHECKs that we can only start removing if we're not |
- // already removing, and vice-versa. |
- static void set_removing(bool removing); |
- |
content::NotificationRegistrar registrar_; |
// Profile we're to remove from. |