OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 STATE_CREATE_MEDIA, | 101 STATE_CREATE_MEDIA, |
102 STATE_DELETE_MAIN, | 102 STATE_DELETE_MAIN, |
103 STATE_DELETE_MEDIA, | 103 STATE_DELETE_MEDIA, |
104 STATE_DONE | 104 STATE_DONE |
105 }; | 105 }; |
106 | 106 |
107 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed | 107 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed |
108 // to be deleted by other objects so make destructor private and DeleteTask | 108 // to be deleted by other objects so make destructor private and DeleteTask |
109 // a friend. | 109 // a friend. |
110 friend class DeleteTask<BrowsingDataRemover>; | 110 friend class DeleteTask<BrowsingDataRemover>; |
111 ~BrowsingDataRemover(); | 111 virtual ~BrowsingDataRemover(); |
112 | 112 |
113 // NotificationObserver method. Callback when TemplateURLModel has finished | 113 // NotificationObserver method. Callback when TemplateURLModel has finished |
114 // loading. Deletes the entries from the model, and if we're not waiting on | 114 // loading. Deletes the entries from the model, and if we're not waiting on |
115 // anything else notifies observers and deletes this BrowsingDataRemover. | 115 // anything else notifies observers and deletes this BrowsingDataRemover. |
116 virtual void Observe(NotificationType type, | 116 virtual void Observe(NotificationType type, |
117 const NotificationSource& source, | 117 const NotificationSource& source, |
118 const NotificationDetails& details); | 118 const NotificationDetails& details); |
119 | 119 |
120 // WaitableEventWatcher implementation. | 120 // WaitableEventWatcher implementation. |
121 // Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone. | 121 // Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 ObserverList<Observer> observer_list_; | 232 ObserverList<Observer> observer_list_; |
233 | 233 |
234 // Used if we need to clear history. | 234 // Used if we need to clear history. |
235 CancelableRequestConsumer request_consumer_; | 235 CancelableRequestConsumer request_consumer_; |
236 | 236 |
237 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 237 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
238 }; | 238 }; |
239 | 239 |
240 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 240 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |