| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed | 91 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed |
| 92 // to be deleted by other objects so make destructor private and DeleteTask | 92 // to be deleted by other objects so make destructor private and DeleteTask |
| 93 // a friend. | 93 // a friend. |
| 94 friend class DeleteTask<BrowsingDataRemover>; | 94 friend class DeleteTask<BrowsingDataRemover>; |
| 95 ~BrowsingDataRemover(); | 95 ~BrowsingDataRemover(); |
| 96 | 96 |
| 97 // NotificationObserver method. Callback when TemplateURLModel has finished | 97 // NotificationObserver method. Callback when TemplateURLModel has finished |
| 98 // loading. Deletes the entries from the model, and if we're not waiting on | 98 // loading. Deletes the entries from the model, and if we're not waiting on |
| 99 // anything else notifies observers and deletes this BrowsingDataRemover. | 99 // anything else notifies observers and deletes this BrowsingDataRemover. |
| 100 void Observe(NotificationType type, | 100 virtual void Observe(NotificationType type, |
| 101 const NotificationSource& source, | 101 const NotificationSource& source, |
| 102 const NotificationDetails& details); | 102 const NotificationDetails& details); |
| 103 | 103 |
| 104 // If we're not waiting on anything, notifies observers and deletes this | 104 // If we're not waiting on anything, notifies observers and deletes this |
| 105 // object. | 105 // object. |
| 106 void NotifyAndDeleteIfDone(); | 106 void NotifyAndDeleteIfDone(); |
| 107 | 107 |
| 108 // Callback when the cache has been deleted. Invokes NotifyAndDeleteIfDone. | 108 // Callback when the cache has been deleted. Invokes NotifyAndDeleteIfDone. |
| 109 void ClearedCache(); | 109 void ClearedCache(); |
| 110 | 110 |
| 111 // Invoked on the IO thread to delete from the cache. | 111 // Invoked on the IO thread to delete from the cache. |
| 112 void ClearCacheOnIOThread(); | 112 void ClearCacheOnIOThread(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 ObserverList<Observer> observer_list_; | 190 ObserverList<Observer> observer_list_; |
| 191 | 191 |
| 192 // Used if we need to clear history. | 192 // Used if we need to clear history. |
| 193 CancelableRequestConsumer request_consumer_; | 193 CancelableRequestConsumer request_consumer_; |
| 194 | 194 |
| 195 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 195 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 198 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |