diff --git a/shell/browser/api/electron_api_cookies.cc b/shell/browser/api/electron_api_cookies.cc index 4ec26e9539a35..f0cb9131de382 100644 --- a/shell/browser/api/electron_api_cookies.cc +++ b/shell/browser/api/electron_api_cookies.cc @@ -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::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( diff --git a/shell/browser/api/electron_api_cookies.h b/shell/browser/api/electron_api_cookies.h index 64b2417927cf6..a8f71cafd0187 100644 --- a/shell/browser/api/electron_api_cookies.h +++ b/shell/browser/api/electron_api_cookies.h @@ -50,7 +50,7 @@ class Cookies final : public gin::Wrappable, Cookies& operator=(const Cookies&) = delete; protected: - Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context); + explicit Cookies(ElectronBrowserContext* browser_context); ~Cookies() override; v8::Local Get(v8::Isolate*,