OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSING_DATA_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 namespace dom_storage { | 45 namespace dom_storage { |
46 struct LocalStorageUsageInfo; | 46 struct LocalStorageUsageInfo; |
47 struct SessionStorageUsageInfo; | 47 struct SessionStorageUsageInfo; |
48 } | 48 } |
49 | 49 |
50 // BrowsingDataRemover is responsible for removing data related to browsing: | 50 // BrowsingDataRemover is responsible for removing data related to browsing: |
51 // visits in url database, downloads, cookies ... | 51 // visits in url database, downloads, cookies ... |
52 | 52 |
53 class BrowsingDataRemover : public content::NotificationObserver, | 53 class BrowsingDataRemover : public content::NotificationObserver |
54 #if defined(ENABLE_PLUGINS) | 54 #if defined(ENABLE_PLUGINS) |
55 public PepperFlashSettingsManager::Client, | 55 , public PepperFlashSettingsManager::Client |
56 #endif | 56 #endif |
57 public base::WaitableEventWatcher::Delegate { | 57 { |
58 public: | 58 public: |
59 // Time period ranges available when doing browsing data removals. | 59 // Time period ranges available when doing browsing data removals. |
60 enum TimePeriod { | 60 enum TimePeriod { |
61 LAST_HOUR = 0, | 61 LAST_HOUR = 0, |
62 LAST_DAY, | 62 LAST_DAY, |
63 LAST_WEEK, | 63 LAST_WEEK, |
64 FOUR_WEEKS, | 64 FOUR_WEEKS, |
65 EVERYTHING | 65 EVERYTHING |
66 }; | 66 }; |
67 | 67 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 virtual ~BrowsingDataRemover(); | 203 virtual ~BrowsingDataRemover(); |
204 | 204 |
205 // content::NotificationObserver method. Callback when TemplateURLService has | 205 // content::NotificationObserver method. Callback when TemplateURLService has |
206 // finished loading. Deletes the entries from the model, and if we're not | 206 // finished loading. Deletes the entries from the model, and if we're not |
207 // waiting on anything else notifies observers and deletes this | 207 // waiting on anything else notifies observers and deletes this |
208 // BrowsingDataRemover. | 208 // BrowsingDataRemover. |
209 virtual void Observe(int type, | 209 virtual void Observe(int type, |
210 const content::NotificationSource& source, | 210 const content::NotificationSource& source, |
211 const content::NotificationDetails& details) OVERRIDE; | 211 const content::NotificationDetails& details) OVERRIDE; |
212 | 212 |
213 // WaitableEventWatcher implementation. | |
214 // Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone. | 213 // Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone. |
215 virtual void OnWaitableEventSignaled( | 214 void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); |
216 base::WaitableEvent* waitable_event) OVERRIDE; | |
217 | 215 |
218 #if defined(ENABLE_PLUGINS) | 216 #if defined(ENABLE_PLUGINS) |
219 // PepperFlashSettingsManager::Client implementation. | 217 // PepperFlashSettingsManager::Client implementation. |
220 virtual void OnDeauthorizeContentLicensesCompleted(uint32 request_id, | 218 virtual void OnDeauthorizeContentLicensesCompleted(uint32 request_id, |
221 bool success) OVERRIDE; | 219 bool success) OVERRIDE; |
222 #endif | 220 #endif |
223 | 221 |
224 // Removes the specified items related to browsing for a specific host. If the | 222 // Removes the specified items related to browsing for a specific host. If the |
225 // provided |origin| is empty, data is removed for all origins. The | 223 // provided |origin| is empty, data is removed for all origins. The |
226 // |origin_set_mask| parameter defines the set of origins from which data | 224 // |origin_set_mask| parameter defines the set of origins from which data |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 408 |
411 ObserverList<Observer> observer_list_; | 409 ObserverList<Observer> observer_list_; |
412 | 410 |
413 // Used if we need to clear history. | 411 // Used if we need to clear history. |
414 CancelableTaskTracker history_task_tracker_; | 412 CancelableTaskTracker history_task_tracker_; |
415 | 413 |
416 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 414 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
417 }; | 415 }; |
418 | 416 |
419 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 417 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |