OLD | NEW |
1 // Copyright (c) 2011 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 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 // Removes the specified items related to browsing. | 118 // Removes the specified items related to browsing. |
119 void Remove(int remove_mask); | 119 void Remove(int remove_mask); |
120 | 120 |
121 void AddObserver(Observer* observer); | 121 void AddObserver(Observer* observer); |
122 void RemoveObserver(Observer* observer); | 122 void RemoveObserver(Observer* observer); |
123 | 123 |
124 // Called when history deletion is done. | 124 // Called when history deletion is done. |
125 void OnHistoryDeletionDone(); | 125 void OnHistoryDeletionDone(); |
126 | 126 |
| 127 // Quota managed data uses a different bitmask for types than |
| 128 // BrowsingDataRemover uses. This method generates that mask. |
| 129 static int GenerateQuotaClientMask(int remove_mask); |
| 130 |
127 static bool is_removing() { return removing_; } | 131 static bool is_removing() { return removing_; } |
128 | 132 |
129 private: | 133 private: |
130 // The clear API needs to be able to toggle removing_ in order to test that | 134 // The clear API needs to be able to toggle removing_ in order to test that |
131 // only one BrowsingDataRemover instance can be called at a time. | 135 // only one BrowsingDataRemover instance can be called at a time. |
132 FRIEND_TEST_ALL_PREFIXES(ExtensionClearTest, OneAtATime); | 136 FRIEND_TEST_ALL_PREFIXES(ExtensionClearTest, OneAtATime); |
133 | 137 |
134 enum CacheState { | 138 enum CacheState { |
135 STATE_NONE, | 139 STATE_NONE, |
136 STATE_CREATE_MAIN, | 140 STATE_CREATE_MAIN, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 280 |
277 ObserverList<Observer> observer_list_; | 281 ObserverList<Observer> observer_list_; |
278 | 282 |
279 // Used if we need to clear history. | 283 // Used if we need to clear history. |
280 CancelableRequestConsumer request_consumer_; | 284 CancelableRequestConsumer request_consumer_; |
281 | 285 |
282 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 286 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
283 }; | 287 }; |
284 | 288 |
285 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 289 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |