Chromium Code Reviews| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 // Creates a BrowsingDataRemover to remove browser data from the specified | 110 // Creates a BrowsingDataRemover to remove browser data from the specified |
| 111 // profile in the specified time range. Use Remove to initiate the removal. | 111 // profile in the specified time range. Use Remove to initiate the removal. |
| 112 BrowsingDataRemover(Profile* profile, base::Time delete_begin, | 112 BrowsingDataRemover(Profile* profile, base::Time delete_begin, |
| 113 base::Time delete_end); | 113 base::Time delete_end); |
| 114 | 114 |
| 115 // Creates a BrowsingDataRemover to remove browser data from the specified | 115 // Creates a BrowsingDataRemover to remove browser data from the specified |
| 116 // profile in the specified time range. | 116 // profile in the specified time range. |
| 117 BrowsingDataRemover(Profile* profile, TimePeriod time_period, | 117 BrowsingDataRemover(Profile* profile, TimePeriod time_period, |
| 118 base::Time delete_end); | 118 base::Time delete_end); |
| 119 | 119 |
| 120 // Removes the specified items related to browsing. | 120 // Removes the specified items related to browsing for all origins. |
| 121 void Remove(int remove_mask); | 121 void Remove(int remove_mask); |
| 122 | 122 |
| 123 // Removes the specified items related to browsing for a specific host. If the | |
| 124 // provided |origin| is empty, data is removed for all origins. | |
| 125 void Remove(int remove_mask, const GURL& origin); | |
|
Bernhard Bauer
2012/02/10 19:50:57
Name this method RemoveOrigin so that you don't ov
| |
| 126 | |
| 123 void AddObserver(Observer* observer); | 127 void AddObserver(Observer* observer); |
| 124 void RemoveObserver(Observer* observer); | 128 void RemoveObserver(Observer* observer); |
| 125 | 129 |
| 126 // Called when history deletion is done. | 130 // Called when history deletion is done. |
| 127 void OnHistoryDeletionDone(); | 131 void OnHistoryDeletionDone(); |
| 128 | 132 |
| 129 // Quota managed data uses a different bitmask for types than | 133 // Quota managed data uses a different bitmask for types than |
| 130 // BrowsingDataRemover uses. This method generates that mask. | 134 // BrowsingDataRemover uses. This method generates that mask. |
| 131 static int GenerateQuotaClientMask(int remove_mask); | 135 static int GenerateQuotaClientMask(int remove_mask); |
| 132 | 136 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 bool waiting_for_clear_quota_managed_data_; | 287 bool waiting_for_clear_quota_managed_data_; |
| 284 | 288 |
| 285 // Tracking how many origins need to be deleted, and whether we're finished | 289 // Tracking how many origins need to be deleted, and whether we're finished |
| 286 // gathering origins. | 290 // gathering origins. |
| 287 int quota_managed_origins_to_delete_count_; | 291 int quota_managed_origins_to_delete_count_; |
| 288 int quota_managed_storage_types_to_delete_count_; | 292 int quota_managed_storage_types_to_delete_count_; |
| 289 | 293 |
| 290 // The removal mask for the current removal operation. | 294 // The removal mask for the current removal operation. |
| 291 int remove_mask_; | 295 int remove_mask_; |
| 292 | 296 |
| 297 // The origin for the current removal operation. | |
| 298 GURL remove_origin_; | |
| 299 | |
| 293 ObserverList<Observer> observer_list_; | 300 ObserverList<Observer> observer_list_; |
| 294 | 301 |
| 295 // Used if we need to clear history. | 302 // Used if we need to clear history. |
| 296 CancelableRequestConsumer request_consumer_; | 303 CancelableRequestConsumer request_consumer_; |
| 297 | 304 |
| 298 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 305 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 299 }; | 306 }; |
| 300 | 307 |
| 301 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 308 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |