OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
7 | 7 |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "chrome/browser/cancelable_request.h" | 10 #include "chrome/browser/cancelable_request.h" |
11 #include "chrome/common/notification_registrar.h" | 11 #include "chrome/common/notification_registrar.h" |
(...skipping 22 matching lines...) Expand all Loading... |
34 static const int REMOVE_COOKIES = 1 << 2; | 34 static const int REMOVE_COOKIES = 1 << 2; |
35 static const int REMOVE_PASSWORDS = 1 << 3; | 35 static const int REMOVE_PASSWORDS = 1 << 3; |
36 static const int REMOVE_FORM_DATA = 1 << 4; | 36 static const int REMOVE_FORM_DATA = 1 << 4; |
37 static const int REMOVE_CACHE = 1 << 5; | 37 static const int REMOVE_CACHE = 1 << 5; |
38 | 38 |
39 // Observer is notified when the removal is done. Done means keywords have | 39 // Observer is notified when the removal is done. Done means keywords have |
40 // been deleted, cache cleared and all other tasks scheduled. | 40 // been deleted, cache cleared and all other tasks scheduled. |
41 class Observer { | 41 class Observer { |
42 public: | 42 public: |
43 virtual void OnBrowsingDataRemoverDone() = 0; | 43 virtual void OnBrowsingDataRemoverDone() = 0; |
44 protected: | |
45 ~Observer() {} | |
46 }; | 44 }; |
47 | 45 |
48 // Creates a BrowsingDataRemover to remove browser data from the specified | 46 // Creates a BrowsingDataRemover to remove browser data from the specified |
49 // profile in the specified time range. Use Remove to initiate the removal. | 47 // profile in the specified time range. Use Remove to initiate the removal. |
50 BrowsingDataRemover(Profile* profile, base::Time delete_begin, | 48 BrowsingDataRemover(Profile* profile, base::Time delete_begin, |
51 base::Time delete_end); | 49 base::Time delete_end); |
52 | 50 |
53 // Creates a BrowsingDataRemover to remove browser data from the specified | 51 // Creates a BrowsingDataRemover to remove browser data from the specified |
54 // profile in the specified time range. | 52 // profile in the specified time range. |
55 BrowsingDataRemover(Profile* profile, TimePeriod time_period, | 53 BrowsingDataRemover(Profile* profile, TimePeriod time_period, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 116 |
119 ObserverList<Observer> observer_list_; | 117 ObserverList<Observer> observer_list_; |
120 | 118 |
121 // Used if we need to clear history. | 119 // Used if we need to clear history. |
122 CancelableRequestConsumer request_consumer_; | 120 CancelableRequestConsumer request_consumer_; |
123 | 121 |
124 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 122 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
125 }; | 123 }; |
126 | 124 |
127 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 125 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |