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