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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 REMOVE_PASSWORDS = 1 << 10, | 63 REMOVE_PASSWORDS = 1 << 10, |
64 REMOVE_WEBSQL = 1 << 11, | 64 REMOVE_WEBSQL = 1 << 11, |
65 REMOVE_CHANNEL_IDS = 1 << 12, | 65 REMOVE_CHANNEL_IDS = 1 << 12, |
66 REMOVE_MEDIA_LICENSES = 1 << 13, | 66 REMOVE_MEDIA_LICENSES = 1 << 13, |
67 REMOVE_SERVICE_WORKERS = 1 << 14, | 67 REMOVE_SERVICE_WORKERS = 1 << 14, |
68 REMOVE_SITE_USAGE_DATA = 1 << 15, | 68 REMOVE_SITE_USAGE_DATA = 1 << 15, |
69 // REMOVE_NOCHECKS intentionally does not check if the browser context is | 69 // REMOVE_NOCHECKS intentionally does not check if the browser context is |
70 // prohibited from deleting history or downloads. | 70 // prohibited from deleting history or downloads. |
71 REMOVE_NOCHECKS = 1 << 16, | 71 REMOVE_NOCHECKS = 1 << 16, |
72 REMOVE_CACHE_STORAGE = 1 << 17, | 72 REMOVE_CACHE_STORAGE = 1 << 17, |
73 #if BUILDFLAG(ANDROID_JAVA_UI) | 73 #if defined(OS_ANDROID) |
74 REMOVE_WEBAPP_DATA = 1 << 18, | 74 REMOVE_WEBAPP_DATA = 1 << 18, |
75 #endif | 75 #endif |
76 REMOVE_DURABLE_PERMISSION = 1 << 19, | 76 REMOVE_DURABLE_PERMISSION = 1 << 19, |
77 | 77 |
78 // The following flag is used only in tests. In normal usage, hosted app | 78 // The following flag is used only in tests. In normal usage, hosted app |
79 // data is controlled by the REMOVE_COOKIES flag, applied to the | 79 // data is controlled by the REMOVE_COOKIES flag, applied to the |
80 // protected-web origin. | 80 // protected-web origin. |
81 REMOVE_HOSTED_APP_DATA_TESTONLY = 1 << 31, | 81 REMOVE_HOSTED_APP_DATA_TESTONLY = 1 << 31, |
82 | 82 |
83 // "Site data" includes cookies, appcache, file systems, indexedDBs, local | 83 // "Site data" includes cookies, appcache, file systems, indexedDBs, local |
84 // storage, webSQL, service workers, cache storage, plugin data, web app | 84 // storage, webSQL, service workers, cache storage, plugin data, web app |
85 // data (on Android) and statistics about passwords. | 85 // data (on Android) and statistics about passwords. |
86 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS | | 86 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS | |
87 REMOVE_INDEXEDDB | | 87 REMOVE_INDEXEDDB | |
88 REMOVE_LOCAL_STORAGE | | 88 REMOVE_LOCAL_STORAGE | |
89 REMOVE_PLUGIN_DATA | | 89 REMOVE_PLUGIN_DATA | |
90 REMOVE_SERVICE_WORKERS | | 90 REMOVE_SERVICE_WORKERS | |
91 REMOVE_CACHE_STORAGE | | 91 REMOVE_CACHE_STORAGE | |
92 REMOVE_WEBSQL | | 92 REMOVE_WEBSQL | |
93 REMOVE_CHANNEL_IDS | | 93 REMOVE_CHANNEL_IDS | |
94 #if BUILDFLAG(ANDROID_JAVA_UI) | 94 #if defined(OS_ANDROID) |
95 REMOVE_WEBAPP_DATA | | 95 REMOVE_WEBAPP_DATA | |
96 #endif | 96 #endif |
97 REMOVE_SITE_USAGE_DATA | | 97 REMOVE_SITE_USAGE_DATA | |
98 REMOVE_DURABLE_PERMISSION, | 98 REMOVE_DURABLE_PERMISSION, |
99 | 99 |
100 // Datatypes protected by Important Sites. | 100 // Datatypes protected by Important Sites. |
101 IMPORTANT_SITES_DATATYPES = REMOVE_SITE_DATA | | 101 IMPORTANT_SITES_DATATYPES = REMOVE_SITE_DATA | REMOVE_CACHE, |
102 REMOVE_CACHE, | |
103 | 102 |
104 // Datatypes that can be deleted partially per URL / origin / domain, | 103 // Datatypes that can be deleted partially per URL / origin / domain, |
105 // whichever makes sense. | 104 // whichever makes sense. |
106 FILTERABLE_DATATYPES = REMOVE_SITE_DATA | | 105 FILTERABLE_DATATYPES = REMOVE_SITE_DATA | REMOVE_CACHE | REMOVE_DOWNLOADS, |
107 REMOVE_CACHE | | |
108 REMOVE_DOWNLOADS, | |
109 | 106 |
110 // Includes all the available remove options. Meant to be used by clients | 107 // Includes all the available remove options. Meant to be used by clients |
111 // that wish to wipe as much data as possible from a Profile, to make it | 108 // that wish to wipe as much data as possible from a Profile, to make it |
112 // look like a new Profile. | 109 // look like a new Profile. |
113 REMOVE_ALL = REMOVE_SITE_DATA | REMOVE_CACHE | REMOVE_DOWNLOADS | | 110 REMOVE_ALL = REMOVE_SITE_DATA | REMOVE_CACHE | REMOVE_DOWNLOADS | |
114 REMOVE_FORM_DATA | | 111 REMOVE_FORM_DATA | |
115 REMOVE_HISTORY | | 112 REMOVE_HISTORY | |
116 REMOVE_PASSWORDS | | 113 REMOVE_PASSWORDS | |
117 REMOVE_MEDIA_LICENSES, | 114 REMOVE_MEDIA_LICENSES, |
118 | 115 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // consider returning them in OnBrowsingDataRemoverDone() callback. If not, | 197 // consider returning them in OnBrowsingDataRemoverDone() callback. If not, |
201 // consider simplifying this interface by removing these methods and changing | 198 // consider simplifying this interface by removing these methods and changing |
202 // the tests to record the parameters using GMock instead. | 199 // the tests to record the parameters using GMock instead. |
203 virtual const base::Time& GetLastUsedBeginTime() = 0; | 200 virtual const base::Time& GetLastUsedBeginTime() = 0; |
204 virtual const base::Time& GetLastUsedEndTime() = 0; | 201 virtual const base::Time& GetLastUsedEndTime() = 0; |
205 virtual int GetLastUsedRemovalMask() = 0; | 202 virtual int GetLastUsedRemovalMask() = 0; |
206 virtual int GetLastUsedOriginTypeMask() = 0; | 203 virtual int GetLastUsedOriginTypeMask() = 0; |
207 }; | 204 }; |
208 | 205 |
209 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 206 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |