| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 8 #include <memory> |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 enum DataType { | 57 enum DataType { |
| 58 // Storage datatypes. | 58 // Storage datatypes. |
| 59 DATA_TYPE_APP_CACHE = 1 << 0, | 59 DATA_TYPE_APP_CACHE = 1 << 0, |
| 60 DATA_TYPE_FILE_SYSTEMS = 1 << 1, | 60 DATA_TYPE_FILE_SYSTEMS = 1 << 1, |
| 61 DATA_TYPE_INDEXED_DB = 1 << 2, | 61 DATA_TYPE_INDEXED_DB = 1 << 2, |
| 62 DATA_TYPE_LOCAL_STORAGE = 1 << 3, | 62 DATA_TYPE_LOCAL_STORAGE = 1 << 3, |
| 63 DATA_TYPE_WEB_SQL = 1 << 4, | 63 DATA_TYPE_WEB_SQL = 1 << 4, |
| 64 DATA_TYPE_SERVICE_WORKERS = 1 << 5, | 64 DATA_TYPE_SERVICE_WORKERS = 1 << 5, |
| 65 DATA_TYPE_CACHE_STORAGE = 1 << 6, | 65 DATA_TYPE_CACHE_STORAGE = 1 << 6, |
| 66 | 66 |
| 67 // Used to request the deletion of embedder-specific storage datatypes. |
| 68 DATA_TYPE_EMBEDDER_DOM_STORAGE = 1 << 7, |
| 69 |
| 70 // DOM-accessible storage (https://www.w3.org/TR/clear-site-data/#storage). |
| 71 // Has the same effect as selecting all storage datatypes listed above |
| 72 // and ones defined by the embedder. |
| 73 DATA_TYPE_DOM_STORAGE = DATA_TYPE_APP_CACHE | DATA_TYPE_FILE_SYSTEMS | |
| 74 DATA_TYPE_INDEXED_DB | |
| 75 DATA_TYPE_LOCAL_STORAGE | |
| 76 DATA_TYPE_WEB_SQL | |
| 77 DATA_TYPE_SERVICE_WORKERS | |
| 78 DATA_TYPE_CACHE_STORAGE | |
| 79 DATA_TYPE_EMBEDDER_DOM_STORAGE, |
| 80 |
| 67 // Other datatypes. | 81 // Other datatypes. |
| 68 DATA_TYPE_COOKIES = 1 << 7, | 82 DATA_TYPE_COOKIES = 1 << 8, |
| 69 DATA_TYPE_CHANNEL_IDS = 1 << 8, | 83 DATA_TYPE_CHANNEL_IDS = 1 << 9, |
| 70 DATA_TYPE_CACHE = 1 << 9, | 84 DATA_TYPE_CACHE = 1 << 10, |
| 71 DATA_TYPE_DOWNLOADS = 1 << 10, | 85 DATA_TYPE_DOWNLOADS = 1 << 11, |
| 72 DATA_TYPE_MEDIA_LICENSES = 1 << 11, | 86 DATA_TYPE_MEDIA_LICENSES = 1 << 12, |
| 73 | 87 |
| 74 // REMOVE_NOCHECKS intentionally does not check if the browser context is | 88 // REMOVE_NOCHECKS intentionally does not check if the browser context is |
| 75 // prohibited from deleting history or downloads. | 89 // prohibited from deleting history or downloads. |
| 76 DATA_TYPE_NO_CHECKS = 1 << 12, | 90 DATA_TYPE_NO_CHECKS = 1 << 13, |
| 77 | 91 |
| 78 // Embedders can add more datatypes beyond this point. | 92 // Embedders can add more datatypes beyond this point. |
| 79 DATA_TYPE_CONTENT_END = DATA_TYPE_NO_CHECKS, | 93 DATA_TYPE_CONTENT_END = DATA_TYPE_NO_CHECKS, |
| 80 }; | 94 }; |
| 81 | 95 |
| 82 enum OriginType { | 96 enum OriginType { |
| 83 // Web storage origins that StoragePartition recognizes as NOT protected | 97 // Web storage origins that StoragePartition recognizes as NOT protected |
| 84 // according to its special storage policy. | 98 // according to its special storage policy. |
| 85 ORIGIN_TYPE_UNPROTECTED_WEB = 1 << 0, | 99 ORIGIN_TYPE_UNPROTECTED_WEB = 1 << 0, |
| 86 | 100 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // consider returning them in OnBrowsingDataRemoverDone() callback. If not, | 185 // consider returning them in OnBrowsingDataRemoverDone() callback. If not, |
| 172 // consider simplifying this interface by removing these methods and changing | 186 // consider simplifying this interface by removing these methods and changing |
| 173 // the tests to record the parameters using GMock instead. | 187 // the tests to record the parameters using GMock instead. |
| 174 virtual const base::Time& GetLastUsedBeginTime() = 0; | 188 virtual const base::Time& GetLastUsedBeginTime() = 0; |
| 175 virtual const base::Time& GetLastUsedEndTime() = 0; | 189 virtual const base::Time& GetLastUsedEndTime() = 0; |
| 176 virtual int GetLastUsedRemovalMask() = 0; | 190 virtual int GetLastUsedRemovalMask() = 0; |
| 177 virtual int GetLastUsedOriginTypeMask() = 0; | 191 virtual int GetLastUsedOriginTypeMask() = 0; |
| 178 }; | 192 }; |
| 179 | 193 |
| 180 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 194 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |