chore: fix more chromium-style errors in windows code (#13487)
Finding more chromium-style linting errors as I build more of the windows code :)
This commit is contained in:
parent
003a92e099
commit
d6af3bfcd2
6 changed files with 23 additions and 16 deletions
|
@ -71,7 +71,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
|
|||
|
||||
#ifdef _DEBUG
|
||||
// Don't display assert dialog boxes in CI test runs
|
||||
static const auto kCI = "ELECTRON_CI";
|
||||
static const char* kCI = "ELECTRON_CI";
|
||||
bool is_ci = IsEnvSet(kCI);
|
||||
if (!is_ci) {
|
||||
for (int i = 0; i < arguments.argc; ++i) {
|
||||
|
|
|
@ -20,7 +20,8 @@ URLRequestAsyncAsarJob::URLRequestAsyncAsarJob(
|
|||
void URLRequestAsyncAsarJob::StartAsync(std::unique_ptr<base::Value> options) {
|
||||
std::string file_path;
|
||||
if (options->is_dict()) {
|
||||
auto path_value = options->FindKeyOfType("path", base::Value::Type::STRING);
|
||||
auto* path_value =
|
||||
options->FindKeyOfType("path", base::Value::Type::STRING);
|
||||
if (path_value)
|
||||
file_path = path_value->GetString();
|
||||
} else if (options->is_string()) {
|
||||
|
|
|
@ -10,6 +10,14 @@ namespace atom {
|
|||
|
||||
namespace util {
|
||||
|
||||
Promise::Promise(v8::Isolate* isolate) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
isolate_ = isolate;
|
||||
resolver_.Reset(isolate, v8::Promise::Resolver::New(isolate));
|
||||
}
|
||||
|
||||
Promise::~Promise() = default;
|
||||
|
||||
v8::Maybe<bool> Promise::RejectWithErrorMessage(const std::string& string) {
|
||||
v8::Local<v8::String> error_message =
|
||||
v8::String::NewFromUtf8(isolate(), string.c_str());
|
||||
|
|
|
@ -16,12 +16,8 @@ namespace util {
|
|||
|
||||
class Promise {
|
||||
public:
|
||||
explicit Promise(v8::Isolate* isolate) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
isolate_ = isolate;
|
||||
resolver_.Reset(isolate, v8::Promise::Resolver::New(isolate));
|
||||
}
|
||||
~Promise() {}
|
||||
explicit Promise(v8::Isolate* isolate);
|
||||
~Promise();
|
||||
|
||||
v8::Isolate* isolate() const { return isolate_; }
|
||||
|
||||
|
|
|
@ -23,13 +23,15 @@ class ColorChooserDialog
|
|||
ColorChooserDialog(views::ColorChooserListener* listener,
|
||||
SkColor initial_color,
|
||||
gfx::NativeWindow owning_window);
|
||||
virtual ~ColorChooserDialog();
|
||||
|
||||
// BaseShellDialog:
|
||||
virtual bool IsRunning(gfx::NativeWindow owning_window) const override;
|
||||
virtual void ListenerDestroyed() override;
|
||||
bool IsRunning(gfx::NativeWindow owning_window) const override;
|
||||
void ListenerDestroyed() override;
|
||||
|
||||
private:
|
||||
~ColorChooserDialog() override;
|
||||
friend class base::RefCountedThreadSafe<ColorChooserDialog>;
|
||||
|
||||
struct ExecuteOpenParams {
|
||||
ExecuteOpenParams(SkColor color, RunState run_state, HWND owner);
|
||||
SkColor color;
|
||||
|
|
|
@ -22,15 +22,15 @@ class ColorChooserWin : public content::ColorChooser,
|
|||
SkColor initial_color);
|
||||
|
||||
ColorChooserWin(content::WebContents* web_contents, SkColor initial_color);
|
||||
~ColorChooserWin();
|
||||
~ColorChooserWin() override;
|
||||
|
||||
// content::ColorChooser overrides:
|
||||
virtual void End() override;
|
||||
virtual void SetSelectedColor(SkColor color) override {}
|
||||
void End() override;
|
||||
void SetSelectedColor(SkColor color) override {}
|
||||
|
||||
// views::ColorChooserListener overrides:
|
||||
virtual void OnColorChosen(SkColor color);
|
||||
virtual void OnColorChooserDialogClosed();
|
||||
void OnColorChosen(SkColor color) override;
|
||||
void OnColorChooserDialogClosed() override;
|
||||
|
||||
private:
|
||||
static ColorChooserWin* current_color_chooser_;
|
||||
|
|
Loading…
Reference in a new issue