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..bf449e2336a95e41e94a1c24a36a6f0d2afe8230 100644 |
--- a/chrome/browser/browsing_data/browsing_data_remover.h |
+++ b/chrome/browser/browsing_data/browsing_data_remover.h |
@@ -116,15 +116,25 @@ 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 deletionPeriod); |
+ |
+ // Quota managed data uses a different bitmask for types than |
+ // BrowsingDataRemover uses. This method generates that mask. |
+ static int GenerateQuotaClientMask(int remove_mask); |
+ |
+ static bool is_removing() { return removing_; } |
markusheintz_
2012/08/28 13:10:23
Please add a comment about the meaning of the retu
Mike West
2012/08/28 13:28:39
Done.
|
// Removes the specified items related to browsing for all origins that match |
// the provided |origin_set_mask| (see BrowsingDataHelper::OriginSetMask). |
@@ -136,15 +146,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 +171,12 @@ class BrowsingDataRemover : public content::NotificationObserver, |
STATE_DONE |
}; |
+ // Creates a BrowsingDataRemover to remove browser data from the specified |
+ // profile in the specified time range. Use Remove to initiate the removal. |
+ // The constructor is private: use the static Create* methods instead. |
markusheintz_
2012/08/28 13:10:23
I think this line is not needed. The pure existenc
Mike West
2012/08/28 13:28:39
Done.
|
+ 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. |
@@ -287,7 +297,7 @@ class BrowsingDataRemover : public content::NotificationObserver, |
void OnClearedFormData(); |
// Calculate the begin time for the deletion range specified by |time_period|. |
- base::Time CalculateBeginDeleteTime(TimePeriod time_period); |
+ static base::Time CalculateBeginDeleteTime(TimePeriod time_period); |
markusheintz_
2012/08/28 13:10:23
Now that this method is static, please move the me
Mike West
2012/08/28 13:28:39
Done.
|
// Returns true if we're all done. |
bool AllDone(); |