chore: use consistent parameter names (#29361)

This commit is contained in:
David Sanders 2021-05-31 18:46:25 -07:00 committed by GitHub
parent d18dbdd72b
commit ba26580f23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 38 additions and 40 deletions

View file

@ -125,7 +125,7 @@ class App : public ElectronBrowserClient::Delegate,
base::OnceClosure SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
net::ClientCertIdentityList identities,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
bool CanCreateWindow(content::RenderFrameHost* opener,
const GURL& opener_url,

View file

@ -35,7 +35,7 @@ class AutoUpdater : public gin::Wrappable<AutoUpdater>,
~AutoUpdater() override;
// Delegate implementations.
void OnError(const std::string& error) override;
void OnError(const std::string& message) override;
void OnError(const std::string& message,
const int code,
const std::string& domain) override;

View file

@ -73,17 +73,15 @@ const void* kElectronApiDownloadItemKey = &kElectronApiDownloadItemKey;
gin::WrapperInfo DownloadItem::kWrapperInfo = {gin::kEmbedderNativeGin};
// static
DownloadItem* DownloadItem::FromDownloadItem(
download::DownloadItem* download_item) {
DownloadItem* DownloadItem::FromDownloadItem(download::DownloadItem* item) {
// ^- say that 7 times fast in a row
auto* data = static_cast<UserDataLink*>(
download_item->GetUserData(kElectronApiDownloadItemKey));
item->GetUserData(kElectronApiDownloadItemKey));
return data ? data->download_item.get() : nullptr;
}
DownloadItem::DownloadItem(v8::Isolate* isolate,
download::DownloadItem* download_item)
: download_item_(download_item), isolate_(isolate) {
DownloadItem::DownloadItem(v8::Isolate* isolate, download::DownloadItem* item)
: download_item_(item), isolate_(isolate) {
download_item_->AddObserver(this);
download_item_->SetUserData(
kElectronApiDownloadItemKey,
@ -118,7 +116,7 @@ void DownloadItem::OnDownloadUpdated(download::DownloadItem* item) {
}
}
void DownloadItem::OnDownloadDestroyed(download::DownloadItem* download_item) {
void DownloadItem::OnDownloadDestroyed(download::DownloadItem* /*item*/) {
download_item_ = nullptr;
Unpin();
}

View file

@ -29,7 +29,7 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
static gin::Handle<DownloadItem> FromOrCreate(v8::Isolate* isolate,
download::DownloadItem* item);
static DownloadItem* FromDownloadItem(download::DownloadItem*);
static DownloadItem* FromDownloadItem(download::DownloadItem* item);
// gin::Wrappable
static gin::WrapperInfo kWrapperInfo;
@ -43,14 +43,14 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
file_dialog::DialogSettings GetSaveDialogOptions() const;
private:
DownloadItem(v8::Isolate* isolate, download::DownloadItem* download_item);
DownloadItem(v8::Isolate* isolate, download::DownloadItem* item);
~DownloadItem() override;
bool CheckAlive() const;
// download::DownloadItem::Observer
void OnDownloadUpdated(download::DownloadItem* download) override;
void OnDownloadDestroyed(download::DownloadItem* download) override;
void OnDownloadUpdated(download::DownloadItem* item) override;
void OnDownloadDestroyed(download::DownloadItem* item) override;
// JS API
void Pause();

View file

@ -85,7 +85,7 @@ class Notification : public gin::Wrappable<Notification>,
void SetHasReply(bool new_has_reply);
void SetUrgency(const std::u16string& new_urgency);
void SetTimeoutType(const std::u16string& new_timeout_type);
void SetReplyPlaceholder(const std::u16string& new_reply_placeholder);
void SetReplyPlaceholder(const std::u16string& new_placeholder);
void SetSound(const std::u16string& sound);
void SetActions(const std::vector<electron::NotificationAction>& actions);
void SetCloseButtonText(const std::u16string& text);

View file

@ -97,7 +97,7 @@ class SimpleURLLoaderWrapper
int64_t sent_bytes) override {}
void Clone(
mojo::PendingReceiver<network::mojom::URLLoaderNetworkServiceObserver>
listener) override;
observer) override;
// SimpleURLLoader callbacks
void OnResponseStarted(const GURL& final_url,