| 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_BROWSING_DATA_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // BrowsingDataRemover is responsible for removing data related to browsing: | 56 // BrowsingDataRemover is responsible for removing data related to browsing: |
| 57 // visits in url database, downloads, cookies ... | 57 // visits in url database, downloads, cookies ... |
| 58 class BrowsingDataRemover : public KeyedService | 58 class BrowsingDataRemover : public KeyedService |
| 59 #if defined(ENABLE_PLUGINS) | 59 #if defined(ENABLE_PLUGINS) |
| 60 , public PepperFlashSettingsManager::Client | 60 , public PepperFlashSettingsManager::Client |
| 61 #endif | 61 #endif |
| 62 { | 62 { |
| 63 public: | 63 public: |
| 64 // Time period ranges available when doing browsing data removals. | 64 // Time period ranges available when doing browsing data removals. |
| 65 // TODO(msramek): As this is now reused on Android, we should move it |
| 66 // to browsing_data_counter_utils.h (and rename appropriately), so that |
| 67 // all fundamental types related to browsing data on all platforms are in |
| 68 // one place. |
| 69 // |
| 70 // A Java counterpart will be generated for this enum. |
| 71 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser |
| 65 enum TimePeriod { | 72 enum TimePeriod { |
| 66 LAST_HOUR = 0, | 73 LAST_HOUR = 0, |
| 67 LAST_DAY, | 74 LAST_DAY, |
| 68 LAST_WEEK, | 75 LAST_WEEK, |
| 69 FOUR_WEEKS, | 76 FOUR_WEEKS, |
| 70 EVERYTHING | 77 EVERYTHING, |
| 78 TIME_PERIOD_LAST = EVERYTHING |
| 71 }; | 79 }; |
| 72 | 80 |
| 73 // Mask used for Remove. | 81 // Mask used for Remove. |
| 74 enum RemoveDataMask { | 82 enum RemoveDataMask { |
| 75 REMOVE_APPCACHE = 1 << 0, | 83 REMOVE_APPCACHE = 1 << 0, |
| 76 REMOVE_CACHE = 1 << 1, | 84 REMOVE_CACHE = 1 << 1, |
| 77 REMOVE_COOKIES = 1 << 2, | 85 REMOVE_COOKIES = 1 << 2, |
| 78 REMOVE_DOWNLOADS = 1 << 3, | 86 REMOVE_DOWNLOADS = 1 << 3, |
| 79 REMOVE_FILE_SYSTEMS = 1 << 4, | 87 REMOVE_FILE_SYSTEMS = 1 << 4, |
| 80 REMOVE_FORM_DATA = 1 << 5, | 88 REMOVE_FORM_DATA = 1 << 5, |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 468 |
| 461 // We do not own this. | 469 // We do not own this. |
| 462 content::StoragePartition* storage_partition_for_testing_ = nullptr; | 470 content::StoragePartition* storage_partition_for_testing_ = nullptr; |
| 463 | 471 |
| 464 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; | 472 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; |
| 465 | 473 |
| 466 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 474 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 467 }; | 475 }; |
| 468 | 476 |
| 469 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 477 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |