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_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 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 enum CacheState { | 162 enum CacheState { |
163 STATE_NONE, | 163 STATE_NONE, |
164 STATE_CREATE_MAIN, | 164 STATE_CREATE_MAIN, |
165 STATE_CREATE_MEDIA, | 165 STATE_CREATE_MEDIA, |
166 STATE_DELETE_MAIN, | 166 STATE_DELETE_MAIN, |
167 STATE_DELETE_MEDIA, | 167 STATE_DELETE_MEDIA, |
168 STATE_DONE | 168 STATE_DONE |
169 }; | 169 }; |
170 | 170 |
171 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed | 171 // BrowsingDataRemover deletes itself (using DeleteHelper) and is not supposed |
172 // to be deleted by other objects so make destructor private and DeleteTask | 172 // to be deleted by other objects so make destructor private and DeleteHelper |
173 // a friend. | 173 // a friend. |
174 friend class base::DeleteHelper<BrowsingDataRemover>; | 174 friend class base::DeleteHelper<BrowsingDataRemover>; |
175 virtual ~BrowsingDataRemover(); | 175 virtual ~BrowsingDataRemover(); |
176 | 176 |
177 // content::NotificationObserver method. Callback when TemplateURLService has | 177 // content::NotificationObserver method. Callback when TemplateURLService has |
178 // finished loading. Deletes the entries from the model, and if we're not | 178 // finished loading. Deletes the entries from the model, and if we're not |
179 // waiting on anything else notifies observers and deletes this | 179 // waiting on anything else notifies observers and deletes this |
180 // BrowsingDataRemover. | 180 // BrowsingDataRemover. |
181 virtual void Observe(int type, | 181 virtual void Observe(int type, |
182 const content::NotificationSource& source, | 182 const content::NotificationSource& source, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 ObserverList<Observer> observer_list_; | 358 ObserverList<Observer> observer_list_; |
359 | 359 |
360 // Used if we need to clear history. | 360 // Used if we need to clear history. |
361 CancelableRequestConsumer request_consumer_; | 361 CancelableRequestConsumer request_consumer_; |
362 | 362 |
363 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 363 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
364 }; | 364 }; |
365 | 365 |
366 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 366 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |