Browse Source

chore: fix some typos (#40506)

David Sanders 1 year ago
parent
commit
cf5f0419f1

+ 1 - 1
docs/api/structures/user-default-types.md

@@ -9,4 +9,4 @@
 * `array` Array\<unknown>
 * `dictionary` Record\<string, unknown>
 
-This type is a helper alias, no object will never exist of this type.
+This type is a helper alias, no object will ever exist of this type.

+ 1 - 1
lib/browser/api/browser-window.ts

@@ -11,7 +11,7 @@ BrowserWindow.prototype._init = function (this: BWT) {
   // Avoid recursive require.
   const { app } = require('electron');
 
-  // Set ID at constructon time so it's accessible after
+  // Set ID at construction time so it's accessible after
   // underlying window destruction.
   const id = this.id;
   Object.defineProperty(this, 'id', {

+ 1 - 1
shell/browser/api/electron_api_app.cc

@@ -494,7 +494,7 @@ bool NotificationCallbackWrapper(
                           base::BindOnce(base::IgnoreResult(callback), cmd, cwd,
                                          std::move(additional_data)));
   }
-  // ProcessSingleton needs to know whether current process is quiting.
+  // ProcessSingleton needs to know whether current process is quitting.
   return !Browser::Get()->is_shutting_down();
 }
 

+ 1 - 1
shell/browser/api/electron_api_desktop_capturer.cc

@@ -235,7 +235,7 @@ void DesktopCapturer::StartHandling(bool capture_window,
   captured_sources_.clear();
 
   if (capture_window && capture_screen) {
-    // Some capturers like PipeWire suppport a single capturer for both screens
+    // Some capturers like PipeWire support a single capturer for both screens
     // and windows. Use it if possible, treating both as window capture
     std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer =
         webrtc::DesktopCapturer::CreateGenericCapturer(

+ 1 - 1
shell/browser/browser_observer.h

@@ -22,7 +22,7 @@ class BrowserObserver : public base::CheckedObserver {
   // The browser has closed all windows and will quit.
   virtual void OnWillQuit(bool* prevent_default) {}
 
-  // The browser has closed all windows. If the browser is quiting, then this
+  // The browser has closed all windows. If the browser is quitting, then this
   // method will not be called, instead it will call OnWillQuit.
   virtual void OnWindowAllClosed() {}
 

+ 2 - 2
shell/browser/electron_download_manager_delegate.cc

@@ -145,7 +145,7 @@ file_dialog::Filters FormatFilterForExtensions(
       if (first_separator_index != std::string::npos)
         first_extension = first_extension.substr(0, first_separator_index);
 
-      // Find the extension name without the preceeding '.' character.
+      // Find the extension name without the preceding '.' character.
       std::string ext_name = first_extension;
       size_t ext_index = ext_name.find_first_not_of('.');
       if (ext_index != std::string::npos)
@@ -169,7 +169,7 @@ file_dialog::Filters FormatFilterForExtensions(
       base::ReplaceChars(desc, "*", base::StringPiece(), &desc);
     }
 
-    // Remove the preceeding '.' character from the extension.
+    // Remove the preceding '.' character from the extension.
     size_t ext_index = ext.find_first_not_of('.');
     if (ext_index != std::string::npos)
       ext = ext.substr(ext_index);

+ 1 - 1
shell/browser/microtasks_runner.cc

@@ -26,7 +26,7 @@ void MicrotasksRunner::DidProcessTask(const base::PendingTask& pending_task) {
   // https://github.com/electron/electron/issues/20013 Node.js now performs its
   // own microtask checkpoint and it may happen is some situations that there is
   // contention for performing checkpoint between Node.js and chromium, ending
-  // up Node.js dealying its callbacks. To fix this, now we always lets Node.js
+  // up Node.js delaying its callbacks. To fix this, now we always lets Node.js
   // handle the checkpoint in the browser process.
   {
     v8::HandleScope handle_scope(isolate_);

+ 1 - 1
shell/browser/net/system_network_context_manager.cc

@@ -56,7 +56,7 @@ const char kNetworkServiceSandboxEnabled[] = "net.network_service_sandbox";
 }
 #endif  // BUILDFLAG(IS_WIN)
 
-// The global instance of the SystemNetworkContextmanager.
+// The global instance of the SystemNetworkContextManager.
 SystemNetworkContextManager* g_system_network_context_manager = nullptr;
 
 network::mojom::HttpAuthStaticParamsPtr CreateHttpAuthStaticParams() {

+ 3 - 3
shell/browser/ui/win/notify_icon_host.cc

@@ -86,15 +86,15 @@ class NotifyIconHost::MouseEnteredExitedDetector {
       SendExitedEvent();
     }
 
-    // If timer is runnig then cursor is arelady over icon and
-    // CheckCursorPositionOverIcon will be repeadly checking when to send
+    // If timer is running then cursor is already over icon and
+    // CheckCursorPositionOverIcon will be repeatedly checking when to send
     // mouse exited event.
     if (mouse_exit_timer_.IsRunning())
       return;
 
     SendEnteredEvent(icon);
 
-    // Start repeadly checking when to send mouse exited event.
+    // Start repeatedly checking when to send mouse exited event.
     StartObservingIcon(icon);
   }
 

+ 1 - 1
shell/browser/usb/usb_chooser_controller.cc

@@ -106,7 +106,7 @@ void UsbChooserController::OnBrowserContextShutdown() {
 }
 
 // Get a list of devices that can be shown in the chooser bubble UI for
-// user to grant permsssion.
+// user to grant permission.
 void UsbChooserController::GotUsbDeviceList(
     std::vector<::device::mojom::UsbDeviceInfoPtr> devices) {
   // Listen to UsbChooserContext for OnDeviceAdded/Removed events after the

+ 1 - 1
shell/browser/zoom_level_delegate.cc

@@ -149,7 +149,7 @@ void ZoomLevelDelegate::InitHostZoomMap(content::HostZoomMap* host_zoom_map) {
   if (host_zoom_dictionary) {
     // Since we're calling this before setting up zoom_subscription_ below we
     // don't need to worry that host_zoom_dictionary is indirectly affected
-    // by calls to HostZoomMap::SExtractPerHostZoomLevelsetZoomLevelForHost().
+    // by calls to HostZoomMap::SetZoomLevelForHost().
     ExtractPerHostZoomLevels(*host_zoom_dictionary);
   }
   zoom_subscription_ =

+ 1 - 1
shell/common/api/BUILD.gn

@@ -11,7 +11,7 @@ mojom("mojo") {
   ]
 
   # Needed for component build or we'll get duplicate symbols for many mojom
-  # interfaces aready included in blink_common.dll
+  # interfaces already included in blink_common.dll
   overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ]
   component_deps = [ "//third_party/blink/public/common" ]
 }

+ 1 - 1
shell/common/gin_helper/event_emitter.h

@@ -21,7 +21,7 @@ class RenderFrameHost;
 
 namespace gin_helper {
 
-// Provide helperers to emit event in JavaScript.
+// Provide helpers to emit event in JavaScript.
 template <typename T>
 class EventEmitter : public gin_helper::Wrappable<T> {
  public:

+ 1 - 1
shell/common/node_bindings.cc

@@ -249,7 +249,7 @@ v8::ModifyCodeGenerationFromStringsResult ModifyCodeGenerationFromStrings(
   }
 
   // If we get here then we have a node environment, so either a) we're in the
-  // non-rendrer process, or b) we're in the renderer process in a context that
+  // non-renderer process, or b) we're in the renderer process in a context that
   // has both node and blink, i.e. contextIsolation disabled.
 
   // If we're in the renderer with contextIsolation disabled, ask blink first

+ 1 - 1
shell/renderer/api/electron_api_context_bridge.cc

@@ -525,7 +525,7 @@ void ProxyFunctionWrapper(const v8::FunctionCallbackInfo<v8::Value>& info) {
     if (maybe_return_value.IsEmpty())
       return;
 
-    // In the case where we encounted an exception converting the return value
+    // In the case where we encountered an exception converting the return value
     // of the function we need to ensure that the exception / thrown value is
     // safely transferred from the function_owning_context (where it was thrown)
     // into the calling_context (where it needs to be thrown) To do this we pull

+ 1 - 1
shell/services/node/node_service.cc

@@ -92,7 +92,7 @@ void NodeService::Initialize(node::mojom::NodeServiceParamsPtr params) {
   // since this call will start compilation and execution
   // of the entry script. If there is an uncaught exception
   // the exit handler set above will be triggered and it expects
-  // both Node Env and JavaScriptEnviroment are setup to perform
+  // both Node Env and JavaScriptEnvironment are setup to perform
   // a clean shutdown of this process.
   node_bindings_->LoadEnvironment(node_env_.get());