 Chromium Code Reviews
 Chromium Code Reviews Issue 345037:
  Fifth patch in getting rid of caching MessageLoop pointers.  (Closed) 
  Base URL: svn://chrome-svn/chrome/trunk/src/
    
  
    Issue 345037:
  Fifth patch in getting rid of caching MessageLoop pointers.  (Closed) 
  Base URL: svn://chrome-svn/chrome/trunk/src/| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 | 
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" | 
| 9 #include "base/time.h" | 9 #include "base/time.h" | 
| 10 #include "chrome/browser/cancelable_request.h" | 10 #include "chrome/browser/cancelable_request.h" | 
| 11 #include "chrome/common/notification_registrar.h" | 11 #include "chrome/common/notification_registrar.h" | 
| 12 | 12 | 
| 13 class MessageLoop; | 13 class MessageLoop; | 
| 
cpu_(ooo_6.6-7.5)
2009/11/03 02:16:24
remove MessageLoop
 
jam
2009/11/03 03:52:47
Done.
 | |
| 14 class Profile; | 14 class Profile; | 
| 15 class URLRequestContextGetter; | 15 class URLRequestContextGetter; | 
| 16 | 16 | 
| 17 // BrowsingDataRemover is responsible for removing data related to browsing: | 17 // BrowsingDataRemover is responsible for removing data related to browsing: | 
| 18 // visits in url database, downloads, cookies ... | 18 // visits in url database, downloads, cookies ... | 
| 19 | 19 | 
| 20 class BrowsingDataRemover : public NotificationObserver { | 20 class BrowsingDataRemover : public NotificationObserver { | 
| 21 public: | 21 public: | 
| 22 // Time period ranges available when doing browsing data removals. | 22 // Time period ranges available when doing browsing data removals. | 
| 23 enum TimePeriod { | 23 enum TimePeriod { | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 // If we're not waiting on anything, notifies observers and deletes this | 82 // If we're not waiting on anything, notifies observers and deletes this | 
| 83 // object. | 83 // object. | 
| 84 void NotifyAndDeleteIfDone(); | 84 void NotifyAndDeleteIfDone(); | 
| 85 | 85 | 
| 86 // Callback when the cache has been deleted. Invokes NotifyAndDeleteIfDone. | 86 // Callback when the cache has been deleted. Invokes NotifyAndDeleteIfDone. | 
| 87 void ClearedCache(); | 87 void ClearedCache(); | 
| 88 | 88 | 
| 89 // Invoked on the IO thread to delete from the cache. | 89 // Invoked on the IO thread to delete from the cache. | 
| 90 void ClearCacheOnIOThread(URLRequestContextGetter* context_getter, | 90 void ClearCacheOnIOThread(URLRequestContextGetter* context_getter, | 
| 91 base::Time delete_begin, | 91 base::Time delete_begin, | 
| 92 base::Time delete_end, | 92 base::Time delete_end); | 
| 93 MessageLoop* ui_loop); | |
| 94 | 93 | 
| 95 // Calculate the begin time for the deletion range specified by |time_period|. | 94 // Calculate the begin time for the deletion range specified by |time_period|. | 
| 96 base::Time CalculateBeginDeleteTime(TimePeriod time_period); | 95 base::Time CalculateBeginDeleteTime(TimePeriod time_period); | 
| 97 | 96 | 
| 98 // Returns true if we're all done. | 97 // Returns true if we're all done. | 
| 99 bool all_done() { | 98 bool all_done() { | 
| 100 return registrar_.IsEmpty() && !waiting_for_clear_cache_ && | 99 return registrar_.IsEmpty() && !waiting_for_clear_cache_ && | 
| 101 !waiting_for_clear_history_; | 100 !waiting_for_clear_history_; | 
| 102 } | 101 } | 
| 103 | 102 | 
| (...skipping 19 matching lines...) Expand all Loading... | |
| 123 | 122 | 
| 124 ObserverList<Observer> observer_list_; | 123 ObserverList<Observer> observer_list_; | 
| 125 | 124 | 
| 126 // Used if we need to clear history. | 125 // Used if we need to clear history. | 
| 127 CancelableRequestConsumer request_consumer_; | 126 CancelableRequestConsumer request_consumer_; | 
| 128 | 127 | 
| 129 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 128 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 
| 130 }; | 129 }; | 
| 131 | 130 | 
| 132 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 131 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 
| OLD | NEW |