chore: remove unused isolate argument from Cookies constructor (#44907)

* chore: remove unused isolate argument from Cookies constructor

unused since the ginify cookies refactor in Mar 2020, commit 22202255

* fix: constructor only takes one arg now, so mark it explicit
This commit is contained in:
Charles Kerr 2024-12-02 10:34:21 -06:00 committed by GitHub
parent 49b294628c
commit 06612cf5d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -292,8 +292,8 @@ std::string StringToCookieSameSite(const std::string* str_ptr,
gin::WrapperInfo Cookies::kWrapperInfo = {gin::kEmbedderNativeGin};
Cookies::Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
: browser_context_(browser_context) {
Cookies::Cookies(ElectronBrowserContext* browser_context)
: browser_context_{browser_context} {
cookie_change_subscription_ =
browser_context_->cookie_change_notifier()->RegisterCookieChangeCallback(
base::BindRepeating(&Cookies::OnCookieChanged,
@ -458,7 +458,7 @@ void Cookies::OnCookieChanged(const net::CookieChangeInfo& change) {
// static
gin::Handle<Cookies> Cookies::Create(v8::Isolate* isolate,
ElectronBrowserContext* browser_context) {
return gin::CreateHandle(isolate, new Cookies(isolate, browser_context));
return gin::CreateHandle(isolate, new Cookies{browser_context});
}
gin::ObjectTemplateBuilder Cookies::GetObjectTemplateBuilder(

View file

@ -50,7 +50,7 @@ class Cookies final : public gin::Wrappable<Cookies>,
Cookies& operator=(const Cookies&) = delete;
protected:
Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
explicit Cookies(ElectronBrowserContext* browser_context);
~Cookies() override;
v8::Local<v8::Promise> Get(v8::Isolate*,