| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed | 108 // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed |
| 109 // to be deleted by other objects so make destructor private and DeleteTask | 109 // to be deleted by other objects so make destructor private and DeleteTask |
| 110 // a friend. | 110 // a friend. |
| 111 friend class DeleteTask<BrowsingDataRemover>; | 111 friend class DeleteTask<BrowsingDataRemover>; |
| 112 virtual ~BrowsingDataRemover(); | 112 virtual ~BrowsingDataRemover(); |
| 113 | 113 |
| 114 // NotificationObserver method. Callback when TemplateURLService has finished | 114 // NotificationObserver method. Callback when TemplateURLService has finished |
| 115 // loading. Deletes the entries from the model, and if we're not waiting on | 115 // loading. Deletes the entries from the model, and if we're not waiting on |
| 116 // anything else notifies observers and deletes this BrowsingDataRemover. | 116 // anything else notifies observers and deletes this BrowsingDataRemover. |
| 117 virtual void Observe(NotificationType type, | 117 virtual void Observe(int type, |
| 118 const NotificationSource& source, | 118 const NotificationSource& source, |
| 119 const NotificationDetails& details); | 119 const NotificationDetails& details); |
| 120 | 120 |
| 121 // WaitableEventWatcher implementation. | 121 // WaitableEventWatcher implementation. |
| 122 // Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone. | 122 // Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone. |
| 123 virtual void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); | 123 virtual void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); |
| 124 | 124 |
| 125 // If we're not waiting on anything, notifies observers and deletes this | 125 // If we're not waiting on anything, notifies observers and deletes this |
| 126 // object. | 126 // object. |
| 127 void NotifyAndDeleteIfDone(); | 127 void NotifyAndDeleteIfDone(); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 ObserverList<Observer> observer_list_; | 242 ObserverList<Observer> observer_list_; |
| 243 | 243 |
| 244 // Used if we need to clear history. | 244 // Used if we need to clear history. |
| 245 CancelableRequestConsumer request_consumer_; | 245 CancelableRequestConsumer request_consumer_; |
| 246 | 246 |
| 247 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 247 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 248 }; | 248 }; |
| 249 | 249 |
| 250 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 250 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |