| 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_CHROME_BROWSING_DATA_REMOVER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_CHROME_BROWSING_DATA_REMOVER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_CHROME_BROWSING_DATA_REMOVER_DELEGATE_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_CHROME_BROWSING_DATA_REMOVER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 DATA_TYPE_FORM_DATA = DATA_TYPE_EMBEDDER_BEGIN << 1, | 60 DATA_TYPE_FORM_DATA = DATA_TYPE_EMBEDDER_BEGIN << 1, |
| 61 DATA_TYPE_PASSWORDS = DATA_TYPE_EMBEDDER_BEGIN << 2, | 61 DATA_TYPE_PASSWORDS = DATA_TYPE_EMBEDDER_BEGIN << 2, |
| 62 DATA_TYPE_PLUGIN_DATA = DATA_TYPE_EMBEDDER_BEGIN << 3, | 62 DATA_TYPE_PLUGIN_DATA = DATA_TYPE_EMBEDDER_BEGIN << 3, |
| 63 #if defined(OS_ANDROID) | 63 #if defined(OS_ANDROID) |
| 64 DATA_TYPE_WEB_APP_DATA = DATA_TYPE_EMBEDDER_BEGIN << 4, | 64 DATA_TYPE_WEB_APP_DATA = DATA_TYPE_EMBEDDER_BEGIN << 4, |
| 65 #endif | 65 #endif |
| 66 DATA_TYPE_SITE_USAGE_DATA = DATA_TYPE_EMBEDDER_BEGIN << 5, | 66 DATA_TYPE_SITE_USAGE_DATA = DATA_TYPE_EMBEDDER_BEGIN << 5, |
| 67 DATA_TYPE_DURABLE_PERMISSION = DATA_TYPE_EMBEDDER_BEGIN << 6, | 67 DATA_TYPE_DURABLE_PERMISSION = DATA_TYPE_EMBEDDER_BEGIN << 6, |
| 68 DATA_TYPE_EXTERNAL_PROTOCOL_DATA = DATA_TYPE_EMBEDDER_BEGIN << 7, | 68 DATA_TYPE_EXTERNAL_PROTOCOL_DATA = DATA_TYPE_EMBEDDER_BEGIN << 7, |
| 69 DATA_TYPE_HOSTED_APP_DATA_TEST_ONLY = DATA_TYPE_EMBEDDER_BEGIN << 8, | 69 DATA_TYPE_HOSTED_APP_DATA_TEST_ONLY = DATA_TYPE_EMBEDDER_BEGIN << 8, |
| 70 DATA_TYPE_CONTENT_SETTINGS = DATA_TYPE_EMBEDDER_BEGIN << 9, |
| 70 | 71 |
| 71 // Group datatypes. | 72 // Group datatypes. |
| 72 | 73 |
| 73 // "Site data" includes storage backend accessible to websites and some | 74 // "Site data" includes storage backend accessible to websites and some |
| 74 // additional metadata kept by the browser (e.g. site usage data). | 75 // additional metadata kept by the browser (e.g. site usage data). |
| 75 DATA_TYPE_SITE_DATA = BrowsingDataRemover::DATA_TYPE_APP_CACHE | | 76 DATA_TYPE_SITE_DATA = BrowsingDataRemover::DATA_TYPE_APP_CACHE | |
| 76 BrowsingDataRemover::DATA_TYPE_COOKIES | | 77 BrowsingDataRemover::DATA_TYPE_COOKIES | |
| 77 BrowsingDataRemover::DATA_TYPE_FILE_SYSTEMS | | 78 BrowsingDataRemover::DATA_TYPE_FILE_SYSTEMS | |
| 78 BrowsingDataRemover::DATA_TYPE_INDEXED_DB | | 79 BrowsingDataRemover::DATA_TYPE_INDEXED_DB | |
| 79 BrowsingDataRemover::DATA_TYPE_LOCAL_STORAGE | | 80 BrowsingDataRemover::DATA_TYPE_LOCAL_STORAGE | |
| (...skipping 10 matching lines...) Expand all Loading... |
| 90 DATA_TYPE_EXTERNAL_PROTOCOL_DATA, | 91 DATA_TYPE_EXTERNAL_PROTOCOL_DATA, |
| 91 | 92 |
| 92 // Datatypes protected by Important Sites. | 93 // Datatypes protected by Important Sites. |
| 93 IMPORTANT_SITES_DATA_TYPES = | 94 IMPORTANT_SITES_DATA_TYPES = |
| 94 DATA_TYPE_SITE_DATA | BrowsingDataRemover::DATA_TYPE_CACHE, | 95 DATA_TYPE_SITE_DATA | BrowsingDataRemover::DATA_TYPE_CACHE, |
| 95 | 96 |
| 96 // Datatypes that can be deleted partially per URL / origin / domain, | 97 // Datatypes that can be deleted partially per URL / origin / domain, |
| 97 // whichever makes sense. | 98 // whichever makes sense. |
| 98 FILTERABLE_DATA_TYPES = DATA_TYPE_SITE_DATA | | 99 FILTERABLE_DATA_TYPES = DATA_TYPE_SITE_DATA | |
| 99 BrowsingDataRemover::DATA_TYPE_CACHE | | 100 BrowsingDataRemover::DATA_TYPE_CACHE | |
| 100 BrowsingDataRemover::DATA_TYPE_DOWNLOADS, | 101 BrowsingDataRemover::DATA_TYPE_DOWNLOADS | |
| 102 DATA_TYPE_CONTENT_SETTINGS, |
| 101 | 103 |
| 102 // Includes all the available remove options. Meant to be used by clients | 104 // Includes all the available remove options. Meant to be used by clients |
| 103 // that wish to wipe as much data as possible from a Profile, to make it | 105 // that wish to wipe as much data as possible from a Profile, to make it |
| 104 // look like a new Profile. | 106 // look like a new Profile. |
| 105 ALL_DATA_TYPES = DATA_TYPE_SITE_DATA | | 107 ALL_DATA_TYPES = DATA_TYPE_SITE_DATA | |
| 106 BrowsingDataRemover::DATA_TYPE_CACHE | | 108 BrowsingDataRemover::DATA_TYPE_CACHE | |
| 107 BrowsingDataRemover::DATA_TYPE_DOWNLOADS | | 109 BrowsingDataRemover::DATA_TYPE_DOWNLOADS | |
| 108 DATA_TYPE_FORM_DATA | | 110 DATA_TYPE_FORM_DATA | |
| 109 DATA_TYPE_HISTORY | | 111 DATA_TYPE_HISTORY | |
| 110 DATA_TYPE_PASSWORDS | | 112 DATA_TYPE_PASSWORDS | |
| 111 BrowsingDataRemover::DATA_TYPE_MEDIA_LICENSES, | 113 BrowsingDataRemover::DATA_TYPE_MEDIA_LICENSES | |
| 114 DATA_TYPE_CONTENT_SETTINGS, |
| 112 | 115 |
| 113 // Includes all available remove options. Meant to be used when the Profile | 116 // Includes all available remove options. Meant to be used when the Profile |
| 114 // is scheduled to be deleted, and all possible data should be wiped from | 117 // is scheduled to be deleted, and all possible data should be wiped from |
| 115 // disk as soon as possible. | 118 // disk as soon as possible. |
| 116 WIPE_PROFILE = ALL_DATA_TYPES | BrowsingDataRemover::DATA_TYPE_NO_CHECKS, | 119 WIPE_PROFILE = ALL_DATA_TYPES | BrowsingDataRemover::DATA_TYPE_NO_CHECKS, |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 // This is an extension of BrowsingDataRemover::OriginType which includes all | 122 // This is an extension of BrowsingDataRemover::OriginType which includes all |
| 120 // origin types therefrom and adds additional Chrome-specific ones. | 123 // origin types therefrom and adds additional Chrome-specific ones. |
| 121 enum OriginType { | 124 enum OriginType { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 // not initialised, so the registry must be mocked out. | 305 // not initialised, so the registry must be mocked out. |
| 303 std::unique_ptr<WebappRegistry> webapp_registry_; | 306 std::unique_ptr<WebappRegistry> webapp_registry_; |
| 304 #endif | 307 #endif |
| 305 | 308 |
| 306 base::WeakPtrFactory<ChromeBrowsingDataRemoverDelegate> weak_ptr_factory_; | 309 base::WeakPtrFactory<ChromeBrowsingDataRemoverDelegate> weak_ptr_factory_; |
| 307 | 310 |
| 308 DISALLOW_COPY_AND_ASSIGN(ChromeBrowsingDataRemoverDelegate); | 311 DISALLOW_COPY_AND_ASSIGN(ChromeBrowsingDataRemoverDelegate); |
| 309 }; | 312 }; |
| 310 | 313 |
| 311 #endif // CHROME_BROWSER_BROWSING_DATA_CHROME_BROWSING_DATA_REMOVER_DELEGATE_H_ | 314 #endif // CHROME_BROWSER_BROWSING_DATA_CHROME_BROWSING_DATA_REMOVER_DELEGATE_H_ |
| OLD | NEW |