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 | #ifdef _DEBUG | ||||||
|   // Don't display assert dialog boxes in CI test runs
 |   // 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); |   bool is_ci = IsEnvSet(kCI); | ||||||
|   if (!is_ci) { |   if (!is_ci) { | ||||||
|     for (int i = 0; i < arguments.argc; ++i) { |     for (int i = 0; i < arguments.argc; ++i) { | ||||||
|  |  | ||||||
|  | @ -20,7 +20,8 @@ URLRequestAsyncAsarJob::URLRequestAsyncAsarJob( | ||||||
| void URLRequestAsyncAsarJob::StartAsync(std::unique_ptr<base::Value> options) { | void URLRequestAsyncAsarJob::StartAsync(std::unique_ptr<base::Value> options) { | ||||||
|   std::string file_path; |   std::string file_path; | ||||||
|   if (options->is_dict()) { |   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) |     if (path_value) | ||||||
|       file_path = path_value->GetString(); |       file_path = path_value->GetString(); | ||||||
|   } else if (options->is_string()) { |   } else if (options->is_string()) { | ||||||
|  |  | ||||||
|  | @ -10,6 +10,14 @@ namespace atom { | ||||||
| 
 | 
 | ||||||
| namespace util { | 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::Maybe<bool> Promise::RejectWithErrorMessage(const std::string& string) { | ||||||
|   v8::Local<v8::String> error_message = |   v8::Local<v8::String> error_message = | ||||||
|       v8::String::NewFromUtf8(isolate(), string.c_str()); |       v8::String::NewFromUtf8(isolate(), string.c_str()); | ||||||
|  |  | ||||||
|  | @ -16,12 +16,8 @@ namespace util { | ||||||
| 
 | 
 | ||||||
| class Promise { | class Promise { | ||||||
|  public: |  public: | ||||||
|   explicit Promise(v8::Isolate* isolate) { |   explicit Promise(v8::Isolate* isolate); | ||||||
|     DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |   ~Promise(); | ||||||
|     isolate_ = isolate; |  | ||||||
|     resolver_.Reset(isolate, v8::Promise::Resolver::New(isolate)); |  | ||||||
|   } |  | ||||||
|   ~Promise() {} |  | ||||||
| 
 | 
 | ||||||
|   v8::Isolate* isolate() const { return isolate_; } |   v8::Isolate* isolate() const { return isolate_; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -23,13 +23,15 @@ class ColorChooserDialog | ||||||
|   ColorChooserDialog(views::ColorChooserListener* listener, |   ColorChooserDialog(views::ColorChooserListener* listener, | ||||||
|                      SkColor initial_color, |                      SkColor initial_color, | ||||||
|                      gfx::NativeWindow owning_window); |                      gfx::NativeWindow owning_window); | ||||||
|   virtual ~ColorChooserDialog(); |  | ||||||
| 
 | 
 | ||||||
|   // BaseShellDialog:
 |   // BaseShellDialog:
 | ||||||
|   virtual bool IsRunning(gfx::NativeWindow owning_window) const override; |   bool IsRunning(gfx::NativeWindow owning_window) const override; | ||||||
|   virtual void ListenerDestroyed() override; |   void ListenerDestroyed() override; | ||||||
| 
 | 
 | ||||||
|  private: |  private: | ||||||
|  |   ~ColorChooserDialog() override; | ||||||
|  |   friend class base::RefCountedThreadSafe<ColorChooserDialog>; | ||||||
|  | 
 | ||||||
|   struct ExecuteOpenParams { |   struct ExecuteOpenParams { | ||||||
|     ExecuteOpenParams(SkColor color, RunState run_state, HWND owner); |     ExecuteOpenParams(SkColor color, RunState run_state, HWND owner); | ||||||
|     SkColor color; |     SkColor color; | ||||||
|  |  | ||||||
|  | @ -22,15 +22,15 @@ class ColorChooserWin : public content::ColorChooser, | ||||||
|                                SkColor initial_color); |                                SkColor initial_color); | ||||||
| 
 | 
 | ||||||
|   ColorChooserWin(content::WebContents* web_contents, SkColor initial_color); |   ColorChooserWin(content::WebContents* web_contents, SkColor initial_color); | ||||||
|   ~ColorChooserWin(); |   ~ColorChooserWin() override; | ||||||
| 
 | 
 | ||||||
|   // content::ColorChooser overrides:
 |   // content::ColorChooser overrides:
 | ||||||
|   virtual void End() override; |   void End() override; | ||||||
|   virtual void SetSelectedColor(SkColor color) override {} |   void SetSelectedColor(SkColor color) override {} | ||||||
| 
 | 
 | ||||||
|   // views::ColorChooserListener overrides:
 |   // views::ColorChooserListener overrides:
 | ||||||
|   virtual void OnColorChosen(SkColor color); |   void OnColorChosen(SkColor color) override; | ||||||
|   virtual void OnColorChooserDialogClosed(); |   void OnColorChooserDialogClosed() override; | ||||||
| 
 | 
 | ||||||
|  private: |  private: | ||||||
|   static ColorChooserWin* current_color_chooser_; |   static ColorChooserWin* current_color_chooser_; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeremy Apthorp
				Jeremy Apthorp