diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 01:37:19 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 01:37:19 +0000 |
commit | 25364e14c155d8eb3015f6be95af264a82ea2158 (patch) | |
tree | 4c5048d9ba7f979894d1e9c4d1723cc8e85759db /chrome/browser/browsing_data_remover.h | |
parent | 3af08941db12e58b76361cda8cf313d529471b35 (diff) | |
download | chromium_src-25364e14c155d8eb3015f6be95af264a82ea2158.zip chromium_src-25364e14c155d8eb3015f6be95af264a82ea2158.tar.gz chromium_src-25364e14c155d8eb3015f6be95af264a82ea2158.tar.bz2 |
Implement clear browsing data dialog in linux
As well, refactored code on the windows side to reuse some functionality for the deletion range specified by its time period.
BUG=11192 (http://crbug.com/11192)
TEST=Looks pretty
Review URL: http://codereview.chromium.org/113558
Patch from Mohamed Mansour <m0.interactive@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.h')
-rw-r--r-- | chrome/browser/browsing_data_remover.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 96c8305..62172a0 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -18,6 +18,14 @@ class Profile; class BrowsingDataRemover : public NotificationObserver { public: + // Time period ranges available when doing browsing data removals. + enum TimePeriod { + LAST_DAY = 0, + LAST_WEEK, + FOUR_WEEKS, + EVERYTHING + }; + // Mask used for Remove. // In addition to visits, this removes keywords and the last session. @@ -39,6 +47,11 @@ class BrowsingDataRemover : public NotificationObserver { // 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 to remove browser data from the specified + // profile in the specified time range. + BrowsingDataRemover(Profile* profile, TimePeriod time_period, + base::Time delete_end); ~BrowsingDataRemover(); // Removes the specified items related to browsing. @@ -72,6 +85,9 @@ class BrowsingDataRemover : public NotificationObserver { base::Time delete_end, MessageLoop* ui_loop); + // 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 all_done() { return !waiting_for_keywords_ && !waiting_for_clear_cache_ && |