feat: Session#clearData API (#40983)

* WIP: Session.clearBrowsingData API

* impl API method

* clean up

* tidy types and comments

* add docs

* add barebones test

* forgot a `#` :(

* tidy: address review comments

* use format macro for cross-platform build

* add another test

* amend docs to disambiguate

* Rename to `clearData`
This commit is contained in:
Calvin 2024-02-25 17:39:17 -07:00 committed by GitHub
parent e95673b052
commit 12d7a8ff66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 106 additions and 0 deletions

View file

@ -147,6 +147,7 @@ class Session : public gin::Wrappable<Session>,
v8::Local<v8::Value> GetPath(v8::Isolate* isolate);
void SetCodeCachePath(gin::Arguments* args);
v8::Local<v8::Promise> ClearCodeCaches(const gin_helper::Dictionary& options);
v8::Local<v8::Promise> ClearData(gin::Arguments* args);
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
base::Value GetSpellCheckerLanguages();
void SetSpellCheckerLanguages(gin_helper::ErrorThrower thrower,