From d8167ce1385814c7b4c9d017f7df191b5f5a09dc Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 27 Oct 2020 08:18:36 -0700 Subject: [PATCH] chore: use consistent parameter names (#26162) --- shell/browser/api/electron_api_notification.h | 2 +- shell/browser/api/electron_api_url_loader.h | 2 +- shell/browser/api/electron_api_view.h | 4 ++-- shell/browser/api/message_port.h | 2 +- shell/browser/electron_browser_client.h | 6 +++--- shell/browser/electron_download_manager_delegate.h | 2 +- shell/browser/native_window.cc | 2 +- shell/browser/net/proxying_websocket.h | 2 +- .../notifications/win/windows_toast_notification.h | 11 ++++++----- shell/common/color_util.h | 2 +- shell/renderer/api/electron_api_context_bridge.h | 2 +- .../electron_extensions_dispatcher_delegate.h | 2 +- 12 files changed, 20 insertions(+), 19 deletions(-) diff --git a/shell/browser/api/electron_api_notification.h b/shell/browser/api/electron_api_notification.h index fd4e0f497b94..a914f88082b4 100644 --- a/shell/browser/api/electron_api_notification.h +++ b/shell/browser/api/electron_api_notification.h @@ -90,7 +90,7 @@ class Notification : public gin::Wrappable, void SetSound(const base::string16& sound); void SetActions(const std::vector& actions); void SetCloseButtonText(const base::string16& text); - void SetToastXml(const base::string16& text); + void SetToastXml(const base::string16& new_toast_xml); private: base::string16 title_; diff --git a/shell/browser/api/electron_api_url_loader.h b/shell/browser/api/electron_api_url_loader.h index 542eea95dad1..6af528c66937 100644 --- a/shell/browser/api/electron_api_url_loader.h +++ b/shell/browser/api/electron_api_url_loader.h @@ -63,7 +63,7 @@ class SimpleURLLoaderWrapper const char* GetTypeName() override; private: - SimpleURLLoaderWrapper(std::unique_ptr loader, + SimpleURLLoaderWrapper(std::unique_ptr request, network::mojom::URLLoaderFactory* url_loader_factory, int options); diff --git a/shell/browser/api/electron_api_view.h b/shell/browser/api/electron_api_view.h index d82b0fcf95ea..cf8552114da4 100644 --- a/shell/browser/api/electron_api_view.h +++ b/shell/browser/api/electron_api_view.h @@ -25,8 +25,8 @@ class View : public gin_helper::Wrappable { v8::Local prototype); #if BUILDFLAG(ENABLE_VIEWS_API) - void AddChildView(gin::Handle view); - void AddChildViewAt(gin::Handle view, size_t index); + void AddChildView(gin::Handle child); + void AddChildViewAt(gin::Handle child, size_t index); #endif views::View* view() const { return view_; } diff --git a/shell/browser/api/message_port.h b/shell/browser/api/message_port.h index f7b2cd5a89b8..d46f077afe44 100644 --- a/shell/browser/api/message_port.h +++ b/shell/browser/api/message_port.h @@ -32,7 +32,7 @@ class MessagePort : public gin::Wrappable, mojo::MessageReceiver { void Start(); void Close(); - void Entangle(blink::MessagePortDescriptor handle); + void Entangle(blink::MessagePortDescriptor port); void Entangle(blink::MessagePortChannel channel); blink::MessagePortChannel Disentangle(); diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index 221b008f2bf6..94ce137ef204 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -99,7 +99,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, content::BrowserContext* browser_context, const GURL& url, bool has_navigation_started, - bool has_request_started, + bool has_response_started, content::SiteInstance** affinity_site_instance) const override; void RegisterPendingSiteInstance( content::RenderFrameHost* render_frame_host, @@ -288,13 +288,13 @@ class ElectronBrowserClient : public content::ContentBrowserClient, content::RenderFrameHost* speculative_rfh, content::BrowserContext* browser_context, const GURL& dest_url, - bool has_request_started) const; + bool has_response_started) const; bool NavigationWasRedirectedCrossSite( content::BrowserContext* browser_context, content::SiteInstance* current_instance, content::SiteInstance* speculative_instance, const GURL& dest_url, - bool has_request_started) const; + bool has_response_started) const; void AddProcessPreferences(int process_id, ProcessPreferences prefs); void RemoveProcessPreferences(int process_id); bool IsProcessObserved(int process_id) const; diff --git a/shell/browser/electron_download_manager_delegate.h b/shell/browser/electron_download_manager_delegate.h index fb0c7e58f224..11c25ab464c8 100644 --- a/shell/browser/electron_download_manager_delegate.h +++ b/shell/browser/electron_download_manager_delegate.h @@ -41,7 +41,7 @@ class ElectronDownloadManagerDelegate // Get the save path set on the associated api::DownloadItem object void GetItemSavePath(download::DownloadItem* item, base::FilePath* path); void GetItemSaveDialogOptions(download::DownloadItem* item, - file_dialog::DialogSettings* settings); + file_dialog::DialogSettings* options); void OnDownloadPathGenerated(uint32_t download_id, content::DownloadTargetCallback callback, diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index f17cab8de919..fd5b82d4bcb1 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -350,7 +350,7 @@ bool NativeWindow::AddTabbedWindow(NativeWindow* window) { return true; // for non-Mac platforms } -void NativeWindow::SetVibrancy(const std::string& filename) {} +void NativeWindow::SetVibrancy(const std::string& type) {} void NativeWindow::SetTouchBar( std::vector items) {} diff --git a/shell/browser/net/proxying_websocket.h b/shell/browser/net/proxying_websocket.h index ba5d69bbb2f6..a96a55584b6b 100644 --- a/shell/browser/net/proxying_websocket.h +++ b/shell/browser/net/proxying_websocket.h @@ -122,7 +122,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, void PauseIncomingMethodCallProcessing(); void ResumeIncomingMethodCallProcessing(); - void OnError(int result); + void OnError(int error_code); // This is used for detecting errors on mojo connection with the network // service. void OnMojoConnectionErrorWithCustomReason(uint32_t custom_reason, diff --git a/shell/browser/notifications/win/windows_toast_notification.h b/shell/browser/notifications/win/windows_toast_notification.h index 769e3280da69..2868b337e241 100644 --- a/shell/browser/notifications/win/windows_toast_notification.h +++ b/shell/browser/notifications/win/windows_toast_notification.h @@ -66,7 +66,7 @@ class WindowsToastNotification : public Notification { const std::wstring& icon_path, const std::wstring& timeout_type, const bool silent, - ABI::Windows::Data::Xml::Dom::IXmlDocument** toastXml); + ABI::Windows::Data::Xml::Dom::IXmlDocument** toast_xml); HRESULT SetXmlAudioSilent(ABI::Windows::Data::Xml::Dom::IXmlDocument* doc); HRESULT SetXmlScenarioReminder( ABI::Windows::Data::Xml::Dom::IXmlDocument* doc); @@ -77,10 +77,11 @@ class WindowsToastNotification : public Notification { const std::wstring& body); HRESULT SetXmlImage(ABI::Windows::Data::Xml::Dom::IXmlDocument* doc, const std::wstring& icon_path); - HRESULT GetTextNodeList(ScopedHString* tag, - ABI::Windows::Data::Xml::Dom::IXmlDocument* doc, - ABI::Windows::Data::Xml::Dom::IXmlNodeList** nodeList, - uint32_t reqLength); + HRESULT GetTextNodeList( + ScopedHString* tag, + ABI::Windows::Data::Xml::Dom::IXmlDocument* doc, + ABI::Windows::Data::Xml::Dom::IXmlNodeList** node_list, + uint32_t req_length); HRESULT AppendTextToXml(ABI::Windows::Data::Xml::Dom::IXmlDocument* doc, ABI::Windows::Data::Xml::Dom::IXmlNode* node, const std::wstring& text); diff --git a/shell/common/color_util.h b/shell/common/color_util.h index 625089fe1ef9..9329185a8142 100644 --- a/shell/common/color_util.h +++ b/shell/common/color_util.h @@ -12,7 +12,7 @@ namespace electron { // Parse hex color like "#FFF" or "#EFEFEF" -SkColor ParseHexColor(const std::string& name); +SkColor ParseHexColor(const std::string& color_string); // Convert color to RGB hex value like "#ABCDEF" std::string ToRGBHex(SkColor color); diff --git a/shell/renderer/api/electron_api_context_bridge.h b/shell/renderer/api/electron_api_context_bridge.h index 509e861c492a..fdae88a06a70 100644 --- a/shell/renderer/api/electron_api_context_bridge.h +++ b/shell/renderer/api/electron_api_context_bridge.h @@ -21,7 +21,7 @@ void ProxyFunctionWrapper(const v8::FunctionCallbackInfo& info); v8::MaybeLocal CreateProxyForAPI( const v8::Local& api_object, const v8::Local& source_context, - const v8::Local& target_context, + const v8::Local& destination_context, context_bridge::ObjectCache* object_cache, bool support_dynamic_properties, int recursion_depth); diff --git a/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h b/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h index 82537bbf46a5..27855ddc5125 100644 --- a/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h +++ b/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h @@ -28,7 +28,7 @@ class ElectronExtensionsDispatcherDelegate extensions::ResourceBundleSourceMap* source_map) override; void RequireWebViewModules(extensions::ScriptContext* context) override; void OnActiveExtensionsUpdated( - const std::set& extensions_ids) override; + const std::set& extension_ids) override; void InitializeBindingsSystem( extensions::Dispatcher* dispatcher, extensions::NativeExtensionBindingsSystem* bindings_system) override;