From 54cc68dd7a818a89dcea522282a819f7b49753fc Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 5 Mar 2021 16:54:18 -0800 Subject: [PATCH] chore: fix lint --- shell/browser/electron_browser_client.cc | 12 ++++++++---- shell/browser/electron_browser_client.h | 4 ++-- .../electron_component_extension_resource_manager.h | 3 ++- .../browser/extensions/electron_extension_system.cc | 6 ++---- shell/browser/net/network_context_service.cc | 3 ++- shell/browser/net/system_network_context_manager.cc | 5 +++-- shell/browser/osr/osr_render_widget_host_view.cc | 3 ++- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 5d071fe5b185..fafb02ebdff1 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -30,6 +30,7 @@ #include "chrome/common/chrome_version.h" #include "components/net_log/chrome_net_log.h" #include "components/network_hints/common/network_hints.mojom.h" +#include "content/browser/site_instance_impl.h" #include "content/public/browser/browser_main_runner.h" #include "content/public/browser/browser_ppapi_host.h" #include "content/public/browser/browser_task_traits.h" @@ -46,7 +47,6 @@ #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" #include "content/public/common/url_constants.h" -#include "content/browser/site_instance_impl.h" #include "electron/buildflags/buildflags.h" #include "electron/grit/electron_resources.h" #include "electron/shell/common/api/api.mojom.h" @@ -197,8 +197,11 @@ namespace { bool g_suppress_renderer_process_restart = false; // c.f. https://chromium-review.googlesource.com/c/chromium/src/+/2680274 -content::SiteInfo GetSiteForURL(content::BrowserContext* browser_context, const GURL& url) { - return content::SiteInfo::Create(content::IsolationContext(browser_context), content::UrlInfo(url, false), content::CoopCoepCrossOriginIsolatedInfo::CreateNonIsolated()); +content::SiteInfo GetSiteForURL(content::BrowserContext* browser_context, + const GURL& url) { + return content::SiteInfo::Create( + content::IsolationContext(browser_context), content::UrlInfo(url, false), + content::CoopCoepCrossOriginIsolatedInfo::CreateNonIsolated()); } bool IsSameWebSite(content::BrowserContext* browser_context, @@ -1074,7 +1077,8 @@ void ElectronBrowserClient::ConfigureNetworkContextParams( bool in_memory, const base::FilePath& relative_partition_path, network::mojom::NetworkContextParams* network_context_params, - cert_verifier::mojom::CertVerifierCreationParams* cert_verifier_creation_params) { + cert_verifier::mojom::CertVerifierCreationParams* + cert_verifier_creation_params) { DCHECK(browser_context); return NetworkContextServiceFactory::GetForContext(browser_context) ->ConfigureNetworkContextParams(network_context_params, diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index f962e4cfd599..3a73958b01db 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -163,8 +163,8 @@ class ElectronBrowserClient : public content::ContentBrowserClient, bool in_memory, const base::FilePath& relative_partition_path, network::mojom::NetworkContextParams* network_context_params, - cert_verifier::mojom::CertVerifierCreationParams* cert_verifier_creation_params) - override; + cert_verifier::mojom::CertVerifierCreationParams* + cert_verifier_creation_params) override; network::mojom::NetworkContext* GetSystemNetworkContext() override; content::MediaObserver* GetMediaObserver() override; content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; diff --git a/shell/browser/extensions/electron_component_extension_resource_manager.h b/shell/browser/extensions/electron_component_extension_resource_manager.h index 6af44b0a95c1..499928f2da9b 100644 --- a/shell/browser/extensions/electron_component_extension_resource_manager.h +++ b/shell/browser/extensions/electron_component_extension_resource_manager.h @@ -33,7 +33,8 @@ class ElectronComponentExtensionResourceManager const std::string& extension_id) const override; private: - void AddComponentResourceEntries(const webui::ResourcePath* entries, size_t size); + void AddComponentResourceEntries(const webui::ResourcePath* entries, + size_t size); // A map from a resource path to the resource ID. Used by // IsComponentExtensionResource. diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 30beafcf4d94..81de1bf9732e 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -84,8 +84,7 @@ void ElectronExtensionSystem::InitForRegularProfile(bool extensions_enabled) { runtime_data_ = std::make_unique(ExtensionRegistry::Get(browser_context_)); quota_service_ = std::make_unique(); - user_script_manager_ = - std::make_unique(browser_context_); + user_script_manager_ = std::make_unique(browser_context_); app_sorting_ = std::make_unique(); extension_loader_ = std::make_unique(browser_context_); @@ -140,8 +139,7 @@ ServiceWorkerManager* ElectronExtensionSystem::service_worker_manager() { return service_worker_manager_.get(); } -UserScriptManager* -ElectronExtensionSystem::user_script_manager() { +UserScriptManager* ElectronExtensionSystem::user_script_manager() { return new UserScriptManager(browser_context_); } diff --git a/shell/browser/net/network_context_service.cc b/shell/browser/net/network_context_service.cc index 99649c6b41b8..a99cdb99eb2a 100644 --- a/shell/browser/net/network_context_service.cc +++ b/shell/browser/net/network_context_service.cc @@ -26,7 +26,8 @@ NetworkContextService::~NetworkContextService() = default; void NetworkContextService::ConfigureNetworkContextParams( network::mojom::NetworkContextParams* network_context_params, - cert_verifier::mojom::CertVerifierCreationParams* cert_verifier_creation_params) { + cert_verifier::mojom::CertVerifierCreationParams* + cert_verifier_creation_params) { bool in_memory = browser_context_->IsOffTheRecord(); const base::FilePath& path = browser_context_->GetPath(); diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index 7ca2308a8361..03385e1a749f 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -158,8 +158,9 @@ SystemNetworkContextManager::CreateDefaultNetworkContextParams() { ConfigureDefaultNetworkContextParams(network_context_params.get()); - cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = - cert_verifier::mojom::CertVerifierCreationParams::New(); + cert_verifier::mojom::CertVerifierCreationParamsPtr + cert_verifier_creation_params = + cert_verifier::mojom::CertVerifierCreationParams::New(); network_context_params->cert_verifier_params = content::GetCertVerifierParams(std::move(cert_verifier_creation_params)); return network_context_params; diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 38b32b81455a..59f0568a5aaa 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -144,7 +144,8 @@ class ElectronDelegatedFrameHostClient return *view_->GetBackgroundColor(); } - void OnFrameTokenChanged(uint32_t frame_token, base::TimeTicks activation_time) override { + void OnFrameTokenChanged(uint32_t frame_token, + base::TimeTicks activation_time) override { view_->render_widget_host()->DidProcessFrame(frame_token, activation_time); }