Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Options parameter for Session.clearData API #41355

Merged
merged 9 commits into from
Apr 1, 2024
Prev Previous commit
Next Next commit
Consolidate & curate data type categories
  • Loading branch information
clavin committed Feb 26, 2024
commit 3ad52b76128832e6e0a8aff11c28c706af631278
2 changes: 0 additions & 2 deletions docs/api/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -1441,13 +1441,11 @@ Clears various different types of data.

* **Background Fetch**: `backgroundFetch`
* **Cache**: `cache`
* **Cache Storage**: `cacheStorage`
* **Cookies**: `cookies`
* **Downloads**: `downloads`
* **File Systems**: `fileSystems`
* **IndexedDB**: `indexedDB`
* **Local Storage**: `localStorage`
* **Media Licenses**: `mediaLicenses`
* **Service Workers**: `serviceWorkers`
* **WebSQL**: `webSQL`

Expand Down
5 changes: 2 additions & 3 deletions shell/browser/api/electron_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,13 @@ constexpr BrowsingDataRemover::OriginType kClearOriginTypeAll =
constexpr auto kDataTypeLookup =
base::MakeFixedFlatMap<std::string_view, BrowsingDataRemover::DataType>({
{"backgroundFetch", BrowsingDataRemover::DATA_TYPE_BACKGROUND_FETCH},
{"cache", BrowsingDataRemover::DATA_TYPE_CACHE},
{"cacheStorage", BrowsingDataRemover::DATA_TYPE_CACHE_STORAGE},
{"cache", BrowsingDataRemover::DATA_TYPE_CACHE |
BrowsingDataRemover::DATA_TYPE_CACHE_STORAGE},
{"cookies", BrowsingDataRemover::DATA_TYPE_COOKIES},
{"downloads", BrowsingDataRemover::DATA_TYPE_DOWNLOADS},
{"fileSystems", BrowsingDataRemover::DATA_TYPE_FILE_SYSTEMS},
{"indexedDB", BrowsingDataRemover::DATA_TYPE_INDEXED_DB},
{"localStorage", BrowsingDataRemover::DATA_TYPE_LOCAL_STORAGE},
{"mediaLicenses", BrowsingDataRemover::DATA_TYPE_MEDIA_LICENSES},
{"serviceWorkers", BrowsingDataRemover::DATA_TYPE_SERVICE_WORKERS},
{"webSQL", BrowsingDataRemover::DATA_TYPE_WEB_SQL},
});
Expand Down