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 <set> | 9 #include <set> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/message_loop_helpers.h" |
12 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
13 #include "base/synchronization/waitable_event_watcher.h" | 14 #include "base/synchronization/waitable_event_watcher.h" |
14 #include "base/time.h" | 15 #include "base/time.h" |
15 #include "chrome/browser/cancelable_request.h" | 16 #include "chrome/browser/cancelable_request.h" |
16 #include "chrome/browser/prefs/pref_member.h" | 17 #include "chrome/browser/prefs/pref_member.h" |
17 #include "content/browser/appcache/chrome_appcache_service.h" | 18 #include "content/browser/appcache/chrome_appcache_service.h" |
18 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
20 #include "webkit/quota/quota_types.h" | 21 #include "webkit/quota/quota_types.h" |
21 | 22 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 STATE_CREATE_MAIN, | 136 STATE_CREATE_MAIN, |
136 STATE_CREATE_MEDIA, | 137 STATE_CREATE_MEDIA, |
137 STATE_DELETE_MAIN, | 138 STATE_DELETE_MAIN, |
138 STATE_DELETE_MEDIA, | 139 STATE_DELETE_MEDIA, |
139 STATE_DONE | 140 STATE_DONE |
140 }; | 141 }; |
141 | 142 |
142 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed | 143 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed |
143 // to be deleted by other objects so make destructor private and DeleteTask | 144 // to be deleted by other objects so make destructor private and DeleteTask |
144 // a friend. | 145 // a friend. |
145 friend class DeleteTask<BrowsingDataRemover>; | 146 friend class base::DeleteHelper<BrowsingDataRemover>; |
146 virtual ~BrowsingDataRemover(); | 147 virtual ~BrowsingDataRemover(); |
147 | 148 |
148 // content::NotificationObserver method. Callback when TemplateURLService has | 149 // content::NotificationObserver method. Callback when TemplateURLService has |
149 // finished loading. Deletes the entries from the model, and if we're not | 150 // finished loading. Deletes the entries from the model, and if we're not |
150 // waiting on anything else notifies observers and deletes this | 151 // waiting on anything else notifies observers and deletes this |
151 // BrowsingDataRemover. | 152 // BrowsingDataRemover. |
152 virtual void Observe(int type, | 153 virtual void Observe(int type, |
153 const content::NotificationSource& source, | 154 const content::NotificationSource& source, |
154 const content::NotificationDetails& details) OVERRIDE; | 155 const content::NotificationDetails& details) OVERRIDE; |
155 | 156 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 276 |
276 ObserverList<Observer> observer_list_; | 277 ObserverList<Observer> observer_list_; |
277 | 278 |
278 // Used if we need to clear history. | 279 // Used if we need to clear history. |
279 CancelableRequestConsumer request_consumer_; | 280 CancelableRequestConsumer request_consumer_; |
280 | 281 |
281 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 282 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
282 }; | 283 }; |
283 | 284 |
284 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 285 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |