chore: cleanup some typos in comments (#25770)

This commit is contained in:
David Sanders 2020-10-13 10:25:21 -07:00 committed by GitHub
parent 183e92a5ae
commit b194030a34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 38 additions and 38 deletions

View file

@ -248,7 +248,7 @@ void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
// Assume the window is not responding if it doesn't cancel the close and is
// not closed in 5s, in this way we can quickly show the unresponsive
// dialog when the window is busy executing some script withouth waiting for
// dialog when the window is busy executing some script without waiting for
// the unresponsive timeout.
if (window_unresponsive_closure_.IsCancelled())
ScheduleUnresponsiveEvent(5000);

View file

@ -126,7 +126,7 @@ struct Converter<electron::ElectronMenuModel*> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
electron::ElectronMenuModel** out) {
// null would be tranfered to NULL.
// null would be transferred to NULL.
if (val->IsNull()) {
*out = nullptr;
return true;

View file

@ -1100,7 +1100,7 @@ void WebContents::PluginCrashed(const base::FilePath& plugin_path,
auto* plugin_service = content::PluginService::GetInstance();
plugin_service->GetPluginInfoByPath(plugin_path, &info);
Emit("plugin-crashed", info.name, info.version);
#endif // BUILDFLAG(ENABLE_PLUIGNS)
#endif // BUILDFLAG(ENABLE_PLUGINS)
}
void WebContents::MediaStartedPlaying(const MediaPlayerInfo& video_type,

View file

@ -195,7 +195,7 @@ class Browser : public WindowListObserver {
void UserActivityWasContinued(const std::string& type,
base::DictionaryValue user_info);
// Gives an oportunity to update the Handoff payload.
// Gives an opportunity to update the Handoff payload.
bool UpdateUserActivityState(const std::string& type,
base::DictionaryValue user_info);

View file

@ -39,7 +39,7 @@ class CommonWebContentsDelegate : public content::WebContentsDelegate,
CommonWebContentsDelegate();
~CommonWebContentsDelegate() override;
// Creates a InspectableWebContents object and takes onwership of
// Creates a InspectableWebContents object and takes ownership of
// |web_contents|.
void InitWithWebContents(content::WebContents* web_contents,
ElectronBrowserContext* browser_context,

View file

@ -403,7 +403,7 @@ bool ElectronBrowserClient::ShouldForceNewSiteInstance(
const GURL& url,
bool has_response_started) const {
if (url.SchemeIs(url::kJavaScriptScheme))
// "javacript:" scheme should always use same SiteInstance
// "javascript:" scheme should always use same SiteInstance
return false;
if (url.SchemeIs(extensions::kExtensionScheme))
return false;

View file

@ -357,7 +357,7 @@ void ElectronBrowserMainParts::ToolkitInitialized() {
// issue to keep updated:
// https://bugs.chromium.org/p/chromium/issues/detail?id=998903
UpdateDarkThemeSetting();
// Update the naitve theme when GTK theme changes. The GetNativeTheme
// Update the native theme when GTK theme changes. The GetNativeTheme
// here returns a NativeThemeGtk, which monitors GTK settings.
dark_theme_observer_.reset(new DarkThemeObserver);
linux_ui->GetNativeTheme(nullptr)->AddObserver(dark_theme_observer_.get());

View file

@ -47,7 +47,7 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver {
// Unittests that do not require actual device enumeration should call this
// API on the singleton. It is safe to call this multiple times on the
// signleton.
// singleton.
void DisableDeviceEnumerationForTesting();
// Overridden from content::MediaObserver:

View file

@ -21,7 +21,7 @@ void MicrotasksRunner::DidProcessTask(const base::PendingTask& pending_task) {
v8::Isolate::Scope scope(isolate_);
// In the browser process we follow Node.js microtask policy of kExplicit
// and let the MicrotaskRunner which is a task observer for chromium UI thread
// scheduler run the micotask checkpoint. This worked fine because Node.js
// scheduler run the microtask checkpoint. This worked fine because Node.js
// also runs microtasks through its task queue, but after
// 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

View file

@ -156,7 +156,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
if (enable_larger_than_screen())
// We need to set a default maximum window size here otherwise Windows
// will not allow us to resize the window larger than scree.
// Setting directly to INT_MAX somehow doesn't work, so we just devide
// Setting directly to INT_MAX somehow doesn't work, so we just divide
// by 10, which should still be large enough.
SetContentSizeConstraints(extensions::SizeConstraints(
gfx::Size(), gfx::Size(INT_MAX / 10, INT_MAX / 10)));

View file

@ -279,10 +279,10 @@ void ElectronURLLoaderFactory::StartLoading(
client_remote->OnReceiveRedirect(redirect_info, std::move(head));
// Unound client, so it an be passed to sub-methods
// Unbound client, so it an be passed to sub-methods
client = client_remote.Unbind();
// When the redirection comes from an intercepted scheme (which has
// |proxy_factory| passed), we askes the proxy factory to create a loader
// |proxy_factory| passed), we ask the proxy factory to create a loader
// for new URL, otherwise we call |StartLoadingHttp|, which creates
// loader with default factory.
//

View file

@ -128,7 +128,7 @@ void NodeStreamLoader::ReadMore() {
// Hold the buffer until the write is done.
buffer_.Reset(isolate_, buffer);
// Write buffer to mojo pipe asyncronously.
// Write buffer to mojo pipe asynchronously.
is_reading_ = false;
is_writing_ = true;
producer_->Write(std::make_unique<mojo::StringDataSource>(

View file

@ -227,9 +227,9 @@ class ProxyingURLLoaderFactory
// This is passed from api::Protocol.
//
// The Protocol instance lives through the lifetime of BrowserContenxt,
// which is guarenteed to cover the lifetime of URLLoaderFactory, so the
// reference is guarenteed to be valid.
// The Protocol instance lives through the lifetime of BrowserContext,
// which is guaranteed to cover the lifetime of URLLoaderFactory, so the
// reference is guaranteed to be valid.
//
// In this way we can avoid using code from api namespace in this file.
const HandlersMap& intercepted_handlers_;

View file

@ -438,7 +438,7 @@ void ProxyingWebSocket::OnError(int error_code) {
void ProxyingWebSocket::OnMojoConnectionErrorWithCustomReason(
uint32_t custom_reason,
const std::string& description) {
// Here we want to nofiy the custom reason to the client, which is why
// Here we want to notify the custom reason to the client, which is why
// we reset |forwarding_handshake_client_| manually.
forwarding_handshake_client_.ResetWithReason(custom_reason, description);
OnError(net::ERR_FAILED);

View file

@ -39,7 +39,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
// AuthRequiredResponse indicates how an OnAuthRequired call is handled.
enum class AuthRequiredResponse {
// No credenitals were provided.
// No credentials were provided.
AUTH_REQUIRED_RESPONSE_NO_ACTION,
// AuthCredentials is filled in with a username and password, which should
// be used in a response to the provided auth challenge.

View file

@ -115,7 +115,7 @@ void DevToolsManagerDelegate::HandleCommand(
// protocol UberDispatcher and generating proper protocol handlers.
// Since we only have one method and it is supposed to close Electron,
// we don't need to add this complexity. Should we decide to support
// metohds like Browser.setWindowBounds, we'll need to do it though.
// methods like Browser.setWindowBounds, we'll need to do it though.
base::PostTask(FROM_HERE, {content::BrowserThread::UI},
base::BindOnce([]() { Browser::Get()->Quit(); }));
return;

View file

@ -136,7 +136,7 @@ DialogResult ShowTaskDialogUTF16(NativeWindow* parent,
}
}
// If "detail" is empty then don't make message hilighted.
// If "detail" is empty then don't make message highlighted.
if (detail.empty()) {
config.pszContent = message.c_str();
} else {

View file

@ -129,7 +129,7 @@ views::MenuItemView* MenuDelegate::GetSiblingMenu(
bool switch_in_progress = !!button_to_open_;
// Always update target to open.
button_to_open_ = button;
// Switching menu asyncnously to avoid crash.
// Switching menu asynchronously to avoid crash.
if (!switch_in_progress) {
base::PostTask(FROM_HERE, {content::BrowserThread::UI},
base::BindOnce(&views::MenuRunner::Cancel,

View file

@ -67,7 +67,7 @@ bool TaskbarHost::SetThumbarButtons(HWND window,
callback_map_.clear();
// The number of buttons in thumbar can not be changed once it is created,
// so we have to claim kMaxButtonsCount buttons initialy in case users add
// so we have to claim kMaxButtonsCount buttons initially in case users add
// more buttons later.
base::win::ScopedHICON icons[kMaxButtonsCount] = {};
THUMBBUTTON thumb_buttons[kMaxButtonsCount] = {};

View file

@ -145,7 +145,7 @@ WebContentsPreferences::WebContentsPreferences(
SetDefaultBoolIfUndefined(options::kEnableWebSQL, true);
bool webSecurity = true;
SetDefaultBoolIfUndefined(options::kWebSecurity, webSecurity);
// If webSecurity was explicity set to false, let's inherit that into
// If webSecurity was explicitly set to false, let's inherit that into
// insecureContent
if (web_preferences.Get(options::kWebSecurity, &webSecurity) &&
!webSecurity) {

View file

@ -263,7 +263,7 @@ void WebContentsZoomController::SetZoomFactorOnNavigationIfNeeded(
// When kZoomFactor is available, it takes precedence over
// pref store values but if the host has zoom factor set explicitly
// then it takes precendence.
// then it takes precedence.
// pref store < kZoomFactor < setZoomLevel
std::string host = net::GetHostOrSpecFromURL(url);
std::string scheme = url.scheme();