From d663b4eaee1689dda3eeef19cfc45cbcd28ade13 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 12 Sep 2018 19:25:56 -0500 Subject: [PATCH] fix: fix gn cpplint warnings (#14583) * chore: fix cpplint 'include_what_you_use' warnings Typically by including , etc. * chore: fix 'static/global string constant' warning Use C style strings instead of std::string. Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables /home/charles/electron/electron-gn/src/electron/script/cpplint.js * refactor: remove global string variables. Fix 'global string variables are not permitted' linter warnings by using the base::NoDestructor<> wrapper to make it explicit that these variables are never destroyed. The style guide's take on globals with nontrivial destructors: https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables * fix: initializer error introduced in last commit * fix: remove WIP file that was included by accident * fix: include order * fix: include order * fix: include order * fix: include order, again --- atom/app/atom_main_delegate.cc | 1 + atom/app/atom_main_delegate.h | 1 + atom/app/node_main.cc | 3 +++ atom/browser/api/atom_api_app.h | 1 + atom/browser/api/atom_api_browser_window.cc | 2 ++ atom/browser/api/atom_api_browser_window.h | 1 + atom/browser/api/atom_api_cookies.cc | 3 +++ atom/browser/api/atom_api_cookies.h | 1 + atom/browser/api/atom_api_debugger.cc | 2 ++ atom/browser/api/atom_api_desktop_capturer.cc | 2 ++ atom/browser/api/atom_api_desktop_capturer.h | 1 + atom/browser/api/atom_api_menu_views.cc | 2 ++ atom/browser/api/atom_api_menu_views.h | 1 + atom/browser/api/atom_api_net_log.cc | 3 +++ atom/browser/api/atom_api_protocol.h | 2 ++ atom/browser/api/atom_api_session.cc | 2 ++ atom/browser/api/atom_api_system_preferences.h | 1 + atom/browser/api/atom_api_web_contents.cc | 2 ++ atom/browser/api/atom_api_web_contents.h | 1 + atom/browser/api/atom_api_web_request.cc | 1 + atom/browser/api/event_subscriber.cc | 5 ++++- atom/browser/api/event_subscriber.h | 2 ++ atom/browser/api/trackable_object.cc | 2 ++ atom/browser/atom_blob_reader.cc | 2 ++ atom/browser/atom_blob_reader.h | 1 + atom/browser/atom_browser_client.cc | 12 ++++++++---- atom/browser/atom_browser_client.h | 1 + atom/browser/atom_browser_context.h | 1 + atom/browser/atom_browser_main_parts.cc | 2 ++ atom/browser/atom_browser_main_parts.h | 1 + atom/browser/atom_javascript_dialog_manager.cc | 1 + atom/browser/atom_permission_manager.cc | 1 + atom/browser/atom_permission_manager.h | 1 + .../atom_speech_recognition_manager_delegate.cc | 1 + atom/browser/bridge_task_runner.cc | 2 ++ atom/browser/browser.cc | 1 + atom/browser/browser.h | 1 + atom/browser/common_web_contents_delegate.cc | 2 ++ atom/browser/common_web_contents_delegate.h | 1 + atom/browser/lib/power_observer_linux.cc | 1 + atom/browser/loader/layered_resource_handler.cc | 3 +++ atom/browser/loader/layered_resource_handler.h | 2 ++ atom/browser/login_handler.cc | 3 +++ atom/browser/native_window_mac.h | 1 + atom/browser/native_window_views.cc | 2 ++ atom/browser/native_window_views.h | 1 + atom/browser/net/asar/url_request_asar_job.cc | 1 + atom/browser/net/atom_cert_verifier.cc | 2 ++ atom/browser/net/atom_network_delegate.cc | 1 + atom/browser/net/atom_network_delegate.h | 1 + atom/browser/net/atom_url_request.cc | 4 ++++ atom/browser/net/atom_url_request.h | 2 ++ atom/browser/net/js_asker.cc | 2 ++ atom/browser/net/js_asker.h | 3 +++ atom/browser/net/url_request_async_asar_job.cc | 1 + atom/browser/net/url_request_async_asar_job.h | 2 ++ atom/browser/net/url_request_buffer_job.cc | 1 + atom/browser/net/url_request_buffer_job.h | 1 + atom/browser/net/url_request_fetch_job.cc | 1 + atom/browser/net/url_request_fetch_job.h | 1 + atom/browser/net/url_request_stream_job.cc | 5 ++++- atom/browser/net/url_request_stream_job.h | 1 + atom/browser/net/url_request_string_job.cc | 1 + atom/browser/net/url_request_string_job.h | 1 + atom/browser/osr/osr_output_device.h | 2 ++ atom/browser/osr/osr_render_widget_host_view.h | 1 + atom/browser/osr/osr_view_proxy.h | 1 + atom/browser/relauncher.cc | 1 + atom/browser/request_context_delegate.cc | 3 +++ atom/browser/request_context_delegate.h | 1 + atom/browser/ui/tray_icon_gtk.h | 1 + atom/browser/ui/views/autofill_popup_view.cc | 3 +++ atom/browser/ui/views/autofill_popup_view.h | 2 ++ atom/browser/ui/views/menu_bar.cc | 2 ++ atom/browser/ui/views/submenu_button.cc | 3 +++ atom/browser/ui/views/submenu_button.h | 2 ++ atom/browser/ui/webui/pdf_viewer_handler.cc | 3 +++ atom/browser/ui/webui/pdf_viewer_handler.h | 1 + atom/browser/ui/webui/pdf_viewer_ui.cc | 2 ++ atom/browser/ui/webui/pdf_viewer_ui.h | 1 + atom/browser/ui/win/notify_icon.h | 1 + atom/browser/ui/x/event_disabler.cc | 2 ++ atom/browser/ui/x/event_disabler.h | 2 ++ atom/browser/ui/x/x_window_utils.cc | 1 + atom/browser/web_contents_preferences.cc | 1 + atom/common/api/atom_api_native_image.cc | 2 ++ atom/common/api/atom_bindings.h | 1 + atom/common/asar/archive.cc | 1 + atom/common/crash_reporter/crash_reporter_mac.h | 1 + atom/common/native_mate_converters/net_converter.cc | 2 ++ .../native_mate_converters/network_converter.cc | 1 + .../native_mate_converters/value_converter.cc | 2 ++ atom/common/node_bindings.cc | 1 + atom/renderer/api/atom_api_spell_check_client.h | 1 + atom/renderer/atom_renderer_client.h | 1 + atom/renderer/atom_sandboxed_renderer_client.cc | 4 ++-- atom/renderer/atom_sandboxed_renderer_client.h | 1 + atom/renderer/guest_view_container.cc | 1 + atom/renderer/renderer_client_base.cc | 1 + atom/renderer/renderer_client_base.h | 1 + atom/renderer/web_worker_observer.h | 2 ++ brightray/browser/browser_client.cc | 8 +++++--- brightray/browser/browser_client.h | 1 + brightray/browser/browser_context.cc | 3 +++ brightray/browser/browser_context.h | 1 + brightray/browser/browser_main_parts.cc | 1 + brightray/browser/devtools_manager_delegate.cc | 1 + brightray/browser/inspectable_web_contents_impl.cc | 1 + brightray/browser/inspectable_web_contents_impl.h | 1 + .../media/media_stream_devices_controller.cc | 2 ++ brightray/browser/net_log.h | 2 ++ brightray/browser/url_request_context_getter.cc | 2 ++ brightray/browser/url_request_context_getter.h | 1 + .../views/inspectable_web_contents_view_views.h | 2 ++ brightray/browser/views/views_delegate.cc | 2 ++ brightray/browser/win/notification_presenter_win.cc | 1 + .../win/win32_desktop_notifications/toast.cc | 1 + brightray/browser/win/win32_notification.cc | 1 + brightray/browser/zoom_level_delegate.h | 1 + brightray/common/application_info.cc | 13 +++++++------ 120 files changed, 204 insertions(+), 17 deletions(-) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 0bb19fe5bb40..31f548dbb64f 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -5,6 +5,7 @@ #include "atom/app/atom_main_delegate.h" #include +#include #include #include "atom/app/atom_content_client.h" diff --git a/atom/app/atom_main_delegate.h b/atom/app/atom_main_delegate.h index affdea01eec2..eb0a36ea8d0b 100644 --- a/atom/app/atom_main_delegate.h +++ b/atom/app/atom_main_delegate.h @@ -5,6 +5,7 @@ #ifndef ATOM_APP_ATOM_MAIN_DELEGATE_H_ #define ATOM_APP_ATOM_MAIN_DELEGATE_H_ +#include #include #include "brightray/common/content_client.h" diff --git a/atom/app/node_main.cc b/atom/app/node_main.cc index af59af226f4e..0a5d00115bb3 100644 --- a/atom/app/node_main.cc +++ b/atom/app/node_main.cc @@ -6,6 +6,9 @@ #include "atom/app/node_main.h" +#include +#include + #include "atom/app/uv_task_runner.h" #include "atom/browser/javascript_environment.h" #include "atom/browser/node_debugger.h" diff --git a/atom/browser/api/atom_api_app.h b/atom/browser/api/atom_api_app.h index ee0ad42c05fe..165563a456aa 100644 --- a/atom/browser/api/atom_api_app.h +++ b/atom/browser/api/atom_api_app.h @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/atom/browser/api/atom_api_browser_window.cc b/atom/browser/api/atom_api_browser_window.cc index d0ae6f4ea784..ecc98c6cf8a6 100644 --- a/atom/browser/api/atom_api_browser_window.cc +++ b/atom/browser/api/atom_api_browser_window.cc @@ -4,6 +4,8 @@ #include "atom/browser/api/atom_api_browser_window.h" +#include + #include "atom/browser/browser.h" #include "atom/browser/unresponsive_suppressor.h" #include "atom/browser/web_contents_preferences.h" diff --git a/atom/browser/api/atom_api_browser_window.h b/atom/browser/api/atom_api_browser_window.h index 770181f5b7f4..79a0737d7704 100644 --- a/atom/browser/api/atom_api_browser_window.h +++ b/atom/browser/api/atom_api_browser_window.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_ #define ATOM_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_ +#include #include #include diff --git a/atom/browser/api/atom_api_cookies.cc b/atom/browser/api/atom_api_cookies.cc index daccf443927a..e1013b711f07 100644 --- a/atom/browser/api/atom_api_cookies.cc +++ b/atom/browser/api/atom_api_cookies.cc @@ -4,6 +4,9 @@ #include "atom/browser/api/atom_api_cookies.h" +#include +#include + #include "atom/browser/atom_browser_context.h" #include "atom/browser/request_context_delegate.h" #include "atom/common/native_mate_converters/callback.h" diff --git a/atom/browser/api/atom_api_cookies.h b/atom/browser/api/atom_api_cookies.h index 8a83a64ca101..f40eaa30f44d 100644 --- a/atom/browser/api/atom_api_cookies.h +++ b/atom/browser/api/atom_api_cookies.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_API_ATOM_API_COOKIES_H_ #define ATOM_BROWSER_API_ATOM_API_COOKIES_H_ +#include #include #include "atom/browser/api/trackable_object.h" diff --git a/atom/browser/api/atom_api_debugger.cc b/atom/browser/api/atom_api_debugger.cc index 7b5c845a0d75..42eb7246b080 100644 --- a/atom/browser/api/atom_api_debugger.cc +++ b/atom/browser/api/atom_api_debugger.cc @@ -4,7 +4,9 @@ #include "atom/browser/api/atom_api_debugger.h" +#include #include +#include #include "atom/common/native_mate_converters/callback.h" #include "atom/common/native_mate_converters/value_converter.h" diff --git a/atom/browser/api/atom_api_desktop_capturer.cc b/atom/browser/api/atom_api_desktop_capturer.cc index 135b4edd1104..91ae96e0286d 100644 --- a/atom/browser/api/atom_api_desktop_capturer.cc +++ b/atom/browser/api/atom_api_desktop_capturer.cc @@ -4,6 +4,8 @@ #include "atom/browser/api/atom_api_desktop_capturer.h" +#include +#include #include using base::PlatformThreadRef; diff --git a/atom/browser/api/atom_api_desktop_capturer.h b/atom/browser/api/atom_api_desktop_capturer.h index 88960e46d49d..388fd7452a47 100644 --- a/atom/browser/api/atom_api_desktop_capturer.h +++ b/atom/browser/api/atom_api_desktop_capturer.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_ #define ATOM_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_ +#include #include #include "atom/browser/api/event_emitter.h" diff --git a/atom/browser/api/atom_api_menu_views.cc b/atom/browser/api/atom_api_menu_views.cc index 3da7dc2842fa..da7f0764f8a7 100644 --- a/atom/browser/api/atom_api_menu_views.cc +++ b/atom/browser/api/atom_api_menu_views.cc @@ -4,6 +4,8 @@ #include "atom/browser/api/atom_api_menu_views.h" +#include + #include "atom/browser/native_window_views.h" #include "atom/browser/unresponsive_suppressor.h" #include "ui/display/screen.h" diff --git a/atom/browser/api/atom_api_menu_views.h b/atom/browser/api/atom_api_menu_views.h index 0a34c19cef31..85ae43dbba7f 100644 --- a/atom/browser/api/atom_api_menu_views.h +++ b/atom/browser/api/atom_api_menu_views.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #include +#include #include "atom/browser/api/atom_api_menu.h" #include "base/memory/weak_ptr.h" diff --git a/atom/browser/api/atom_api_net_log.cc b/atom/browser/api/atom_api_net_log.cc index 299ef76f83a8..24bd017f3d96 100644 --- a/atom/browser/api/atom_api_net_log.cc +++ b/atom/browser/api/atom_api_net_log.cc @@ -3,6 +3,9 @@ // found in the LICENSE file. #include "atom/browser/api/atom_api_net_log.h" + +#include + #include "atom/browser/atom_browser_client.h" #include "atom/common/native_mate_converters/callback.h" #include "atom/common/native_mate_converters/file_path_converter.h" diff --git a/atom/browser/api/atom_api_protocol.h b/atom/browser/api/atom_api_protocol.h index deaf680c996c..eb58159d75fe 100644 --- a/atom/browser/api/atom_api_protocol.h +++ b/atom/browser/api/atom_api_protocol.h @@ -6,7 +6,9 @@ #define ATOM_BROWSER_API_ATOM_API_PROTOCOL_H_ #include +#include #include +#include #include #include "atom/browser/api/trackable_object.h" diff --git a/atom/browser/api/atom_api_session.cc b/atom/browser/api/atom_api_session.cc index 311312972037..3749803234f8 100644 --- a/atom/browser/api/atom_api_session.cc +++ b/atom/browser/api/atom_api_session.cc @@ -5,7 +5,9 @@ #include "atom/browser/api/atom_api_session.h" #include +#include #include +#include #include #include "atom/browser/api/atom_api_cookies.h" diff --git a/atom/browser/api/atom_api_system_preferences.h b/atom/browser/api/atom_api_system_preferences.h index e0ef26a9fc46..7ea9d4cb29fb 100644 --- a/atom/browser/api/atom_api_system_preferences.h +++ b/atom/browser/api/atom_api_system_preferences.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_ #define ATOM_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_ +#include #include #include "atom/browser/api/event_emitter.h" diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 50c3fc52c92e..4fadf30545a6 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -4,8 +4,10 @@ #include "atom/browser/api/atom_api_web_contents.h" +#include #include #include +#include #include "atom/browser/api/atom_api_browser_window.h" #include "atom/browser/api/atom_api_debugger.h" diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 0dbb80885684..558a1a27adf1 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_API_ATOM_API_WEB_CONTENTS_H_ #define ATOM_BROWSER_API_ATOM_API_WEB_CONTENTS_H_ +#include #include #include diff --git a/atom/browser/api/atom_api_web_request.cc b/atom/browser/api/atom_api_web_request.cc index c088196f8331..6901955d96fa 100644 --- a/atom/browser/api/atom_api_web_request.cc +++ b/atom/browser/api/atom_api_web_request.cc @@ -5,6 +5,7 @@ #include "atom/browser/api/atom_api_web_request.h" #include +#include #include "atom/browser/atom_browser_context.h" #include "atom/browser/net/atom_network_delegate.h" diff --git a/atom/browser/api/event_subscriber.cc b/atom/browser/api/event_subscriber.cc index afcd8012766c..0faa3b775107 100644 --- a/atom/browser/api/event_subscriber.cc +++ b/atom/browser/api/event_subscriber.cc @@ -1,9 +1,12 @@ // Copyright (c) 2017 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include #include "atom/browser/api/event_subscriber.h" + +#include +#include + #include "atom/common/native_mate_converters/callback.h" namespace { diff --git a/atom/browser/api/event_subscriber.h b/atom/browser/api/event_subscriber.h index 8e9dcf518d98..980b433a0381 100644 --- a/atom/browser/api/event_subscriber.h +++ b/atom/browser/api/event_subscriber.h @@ -6,7 +6,9 @@ #define ATOM_BROWSER_API_EVENT_SUBSCRIBER_H_ #include +#include #include +#include #include "atom/common/api/event_emitter_caller.h" #include "base/synchronization/lock.h" diff --git a/atom/browser/api/trackable_object.cc b/atom/browser/api/trackable_object.cc index 7955ddefcabe..40c9d40283c0 100644 --- a/atom/browser/api/trackable_object.cc +++ b/atom/browser/api/trackable_object.cc @@ -4,6 +4,8 @@ #include "atom/browser/api/trackable_object.h" +#include + #include "atom/browser/atom_browser_main_parts.h" #include "base/bind.h" #include "base/supports_user_data.h" diff --git a/atom/browser/atom_blob_reader.cc b/atom/browser/atom_blob_reader.cc index 1fd883c2c117..5e2d09caf1eb 100644 --- a/atom/browser/atom_blob_reader.cc +++ b/atom/browser/atom_blob_reader.cc @@ -4,6 +4,8 @@ #include "atom/browser/atom_blob_reader.h" +#include + #include "content/browser/blob_storage/chrome_blob_storage_context.h" #include "content/public/browser/browser_thread.h" #include "net/base/io_buffer.h" diff --git a/atom/browser/atom_blob_reader.h b/atom/browser/atom_blob_reader.h index 894d0fbe75ab..871bb77ee240 100644 --- a/atom/browser/atom_blob_reader.h +++ b/atom/browser/atom_blob_reader.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_ATOM_BLOB_READER_H_ #define ATOM_BROWSER_ATOM_BLOB_READER_H_ +#include #include #include "base/callback.h" diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index fc189313aba3..5a795bbd2e2f 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -8,6 +8,9 @@ #include #endif +#include +#include + #include "atom/browser/api/atom_api_app.h" #include "atom/browser/api/atom_api_protocol.h" #include "atom/browser/api/atom_api_web_contents.h" @@ -28,6 +31,7 @@ #include "base/command_line.h" #include "base/environment.h" #include "base/files/file_util.h" +#include "base/no_destructor.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" @@ -82,7 +86,7 @@ namespace { bool g_suppress_renderer_process_restart = false; // Custom schemes to be registered to handle service worker. -std::string g_custom_service_worker_schemes = ""; +base::NoDestructor g_custom_service_worker_schemes; bool IsSameWebSite(content::BrowserContext* browser_context, const GURL& src_url, @@ -105,7 +109,7 @@ void AtomBrowserClient::SuppressRendererProcessRestartForOnce() { void AtomBrowserClient::SetCustomServiceWorkerSchemes( const std::vector& schemes) { - g_custom_service_worker_schemes = base::JoinString(schemes, ","); + *g_custom_service_worker_schemes = base::JoinString(schemes, ","); } AtomBrowserClient::AtomBrowserClient() {} @@ -326,9 +330,9 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches( arraysize(kCommonSwitchNames)); // The registered service worker schemes. - if (!g_custom_service_worker_schemes.empty()) + if (!g_custom_service_worker_schemes->empty()) command_line->AppendSwitchASCII(switches::kRegisterServiceWorkerSchemes, - g_custom_service_worker_schemes); + *g_custom_service_worker_schemes); #if defined(OS_WIN) // Append --app-user-model-id. diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 82977292237f..df955ec99c7f 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_ATOM_BROWSER_CLIENT_H_ #include +#include #include #include #include diff --git a/atom/browser/atom_browser_context.h b/atom/browser/atom_browser_context.h index 9e6a841ceb8d..fd9e8830c679 100644 --- a/atom/browser/atom_browser_context.h +++ b/atom/browser/atom_browser_context.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_ATOM_BROWSER_CONTEXT_H_ #define ATOM_BROWSER_ATOM_BROWSER_CONTEXT_H_ +#include #include #include diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index 6815f9dd94ec..73b339de2e9e 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -4,6 +4,8 @@ #include "atom/browser/atom_browser_main_parts.h" +#include + #include "atom/browser/api/atom_api_app.h" #include "atom/browser/api/trackable_object.h" #include "atom/browser/atom_browser_client.h" diff --git a/atom/browser/atom_browser_main_parts.h b/atom/browser/atom_browser_main_parts.h index c6ea9b5a5f72..517afd25d841 100644 --- a/atom/browser/atom_browser_main_parts.h +++ b/atom/browser/atom_browser_main_parts.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_H_ #include +#include #include #include "base/callback.h" diff --git a/atom/browser/atom_javascript_dialog_manager.cc b/atom/browser/atom_javascript_dialog_manager.cc index 25fc326ebac3..f2b137bf14cd 100644 --- a/atom/browser/atom_javascript_dialog_manager.cc +++ b/atom/browser/atom_javascript_dialog_manager.cc @@ -5,6 +5,7 @@ #include "atom/browser/atom_javascript_dialog_manager.h" #include +#include #include #include "atom/browser/api/atom_api_web_contents.h" diff --git a/atom/browser/atom_permission_manager.cc b/atom/browser/atom_permission_manager.cc index 47602ab46749..4e4f8717b2d6 100644 --- a/atom/browser/atom_permission_manager.cc +++ b/atom/browser/atom_permission_manager.cc @@ -4,6 +4,7 @@ #include "atom/browser/atom_permission_manager.h" +#include #include #include "atom/browser/atom_browser_client.h" diff --git a/atom/browser/atom_permission_manager.h b/atom/browser/atom_permission_manager.h index 57aa5602f866..3885d155f0cc 100644 --- a/atom/browser/atom_permission_manager.h +++ b/atom/browser/atom_permission_manager.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_ATOM_PERMISSION_MANAGER_H_ #include +#include #include #include "base/callback.h" diff --git a/atom/browser/atom_speech_recognition_manager_delegate.cc b/atom/browser/atom_speech_recognition_manager_delegate.cc index 8333211d9ed8..c3a183aa57b8 100644 --- a/atom/browser/atom_speech_recognition_manager_delegate.cc +++ b/atom/browser/atom_speech_recognition_manager_delegate.cc @@ -5,6 +5,7 @@ #include "atom/browser/atom_speech_recognition_manager_delegate.h" #include +#include #include "base/callback.h" diff --git a/atom/browser/bridge_task_runner.cc b/atom/browser/bridge_task_runner.cc index c0b3cd750d9d..a80002c0698b 100644 --- a/atom/browser/bridge_task_runner.cc +++ b/atom/browser/bridge_task_runner.cc @@ -4,6 +4,8 @@ #include "atom/browser/bridge_task_runner.h" +#include + #include "base/message_loop/message_loop.h" namespace atom { diff --git a/atom/browser/browser.cc b/atom/browser/browser.cc index ce35de64d60c..12c1f6262fa5 100644 --- a/atom/browser/browser.cc +++ b/atom/browser/browser.cc @@ -4,6 +4,7 @@ #include "atom/browser/browser.h" +#include #include #include "atom/browser/atom_browser_main_parts.h" diff --git a/atom/browser/browser.h b/atom/browser/browser.h index aed7d25c37da..0d2e1a82f284 100644 --- a/atom/browser/browser.h +++ b/atom/browser/browser.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_BROWSER_H_ #define ATOM_BROWSER_BROWSER_H_ +#include #include #include diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index fca684801b78..de8a4f251be3 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -4,8 +4,10 @@ #include "atom/browser/common_web_contents_delegate.h" +#include #include #include +#include #include #include "atom/browser/atom_browser_context.h" diff --git a/atom/browser/common_web_contents_delegate.h b/atom/browser/common_web_contents_delegate.h index f9aebc02c0f0..1111b061b585 100644 --- a/atom/browser/common_web_contents_delegate.h +++ b/atom/browser/common_web_contents_delegate.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_COMMON_WEB_CONTENTS_DELEGATE_H_ #include +#include #include #include diff --git a/atom/browser/lib/power_observer_linux.cc b/atom/browser/lib/power_observer_linux.cc index 1719fad2dadf..7a24d5c3bda0 100644 --- a/atom/browser/lib/power_observer_linux.cc +++ b/atom/browser/lib/power_observer_linux.cc @@ -6,6 +6,7 @@ #include #include #include +#include #include "base/bind.h" #include "device/bluetooth/dbus/dbus_thread_manager_linux.h" diff --git a/atom/browser/loader/layered_resource_handler.cc b/atom/browser/loader/layered_resource_handler.cc index c0281c557676..60dbcbccffda 100644 --- a/atom/browser/loader/layered_resource_handler.cc +++ b/atom/browser/loader/layered_resource_handler.cc @@ -4,6 +4,9 @@ #include "atom/browser/loader/layered_resource_handler.h" +#include +#include + namespace atom { LayeredResourceHandler::LayeredResourceHandler( diff --git a/atom/browser/loader/layered_resource_handler.h b/atom/browser/loader/layered_resource_handler.h index 5accc9d50bbb..ba1ad16e90d8 100644 --- a/atom/browser/loader/layered_resource_handler.h +++ b/atom/browser/loader/layered_resource_handler.h @@ -5,6 +5,8 @@ #ifndef ATOM_BROWSER_LOADER_LAYERED_RESOURCE_HANDLER_H_ #define ATOM_BROWSER_LOADER_LAYERED_RESOURCE_HANDLER_H_ +#include + #include "content/browser/loader/layered_resource_handler.h" #include "services/network/public/cpp/resource_response.h" diff --git a/atom/browser/login_handler.cc b/atom/browser/login_handler.cc index 2063c6197fce..80525ebfd338 100644 --- a/atom/browser/login_handler.cc +++ b/atom/browser/login_handler.cc @@ -4,6 +4,9 @@ #include "atom/browser/login_handler.h" +#include +#include + #include "atom/browser/browser.h" #include "atom/common/native_mate_converters/net_converter.h" #include "base/values.h" diff --git a/atom/browser/native_window_mac.h b/atom/browser/native_window_mac.h index 84898d986b38..d374e452e697 100644 --- a/atom/browser/native_window_mac.h +++ b/atom/browser/native_window_mac.h @@ -7,6 +7,7 @@ #import +#include #include #include diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 15629b121cc8..9d4f9110fff5 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -9,6 +9,8 @@ #include #endif +#include +#include #include #include "atom/browser/api/atom_api_web_contents.h" diff --git a/atom/browser/native_window_views.h b/atom/browser/native_window_views.h index 4b61754ed865..829982a70b05 100644 --- a/atom/browser/native_window_views.h +++ b/atom/browser/native_window_views.h @@ -7,6 +7,7 @@ #include "atom/browser/native_window.h" +#include #include #include diff --git a/atom/browser/net/asar/url_request_asar_job.cc b/atom/browser/net/asar/url_request_asar_job.cc index 85eb2e1dd142..a6a323d7c532 100644 --- a/atom/browser/net/asar/url_request_asar_job.cc +++ b/atom/browser/net/asar/url_request_asar_job.cc @@ -5,6 +5,7 @@ #include "atom/browser/net/asar/url_request_asar_job.h" #include +#include #include #include "atom/common/asar/archive.h" diff --git a/atom/browser/net/atom_cert_verifier.cc b/atom/browser/net/atom_cert_verifier.cc index 75437f605c83..4e2cc87eee32 100644 --- a/atom/browser/net/atom_cert_verifier.cc +++ b/atom/browser/net/atom_cert_verifier.cc @@ -4,6 +4,8 @@ #include "atom/browser/net/atom_cert_verifier.h" +#include + #include "atom/browser/browser.h" #include "atom/common/native_mate_converters/net_converter.h" #include "base/containers/linked_list.h" diff --git a/atom/browser/net/atom_network_delegate.cc b/atom/browser/net/atom_network_delegate.cc index e71ea74317b6..2bd337ed9f5a 100644 --- a/atom/browser/net/atom_network_delegate.cc +++ b/atom/browser/net/atom_network_delegate.cc @@ -4,6 +4,7 @@ #include "atom/browser/net/atom_network_delegate.h" +#include #include #include "atom/browser/api/atom_api_web_contents.h" diff --git a/atom/browser/net/atom_network_delegate.h b/atom/browser/net/atom_network_delegate.h index 39a7a8ddfcda..b585ead77e26 100644 --- a/atom/browser/net/atom_network_delegate.h +++ b/atom/browser/net/atom_network_delegate.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_NET_ATOM_NETWORK_DELEGATE_H_ #include +#include #include #include #include diff --git a/atom/browser/net/atom_url_request.cc b/atom/browser/net/atom_url_request.cc index 5ffbfd65a48b..8e7ef6383f48 100644 --- a/atom/browser/net/atom_url_request.cc +++ b/atom/browser/net/atom_url_request.cc @@ -4,7 +4,11 @@ // found in the LICENSE file. #include "atom/browser/net/atom_url_request.h" + #include +#include +#include + #include "atom/browser/api/atom_api_url_request.h" #include "atom/browser/atom_browser_context.h" #include "atom/browser/net/atom_url_request_job_factory.h" diff --git a/atom/browser/net/atom_url_request.h b/atom/browser/net/atom_url_request.h index fde7b161385f..25050ab475e8 100644 --- a/atom/browser/net/atom_url_request.h +++ b/atom/browser/net/atom_url_request.h @@ -7,7 +7,9 @@ #define ATOM_BROWSER_NET_ATOM_URL_REQUEST_H_ #include +#include #include + #include "atom/browser/api/atom_api_url_request.h" #include "atom/browser/atom_browser_context.h" #include "base/memory/ref_counted.h" diff --git a/atom/browser/net/js_asker.cc b/atom/browser/net/js_asker.cc index 59e3ab881c23..c64c3be139ac 100644 --- a/atom/browser/net/js_asker.cc +++ b/atom/browser/net/js_asker.cc @@ -4,6 +4,8 @@ #include "atom/browser/net/js_asker.h" +#include +#include #include #include "atom/common/native_mate_converters/callback.h" diff --git a/atom/browser/net/js_asker.h b/atom/browser/net/js_asker.h index 45e2da9b8220..5a8139cfa25b 100644 --- a/atom/browser/net/js_asker.h +++ b/atom/browser/net/js_asker.h @@ -5,6 +5,9 @@ #ifndef ATOM_BROWSER_NET_JS_ASKER_H_ #define ATOM_BROWSER_NET_JS_ASKER_H_ +#include +#include + #include "atom/common/native_mate_converters/net_converter.h" #include "base/callback.h" #include "base/memory/ref_counted.h" diff --git a/atom/browser/net/url_request_async_asar_job.cc b/atom/browser/net/url_request_async_asar_job.cc index 1c15fd39b9d4..531d9ea8851b 100644 --- a/atom/browser/net/url_request_async_asar_job.cc +++ b/atom/browser/net/url_request_async_asar_job.cc @@ -4,6 +4,7 @@ #include "atom/browser/net/url_request_async_asar_job.h" +#include #include #include "atom/common/atom_constants.h" diff --git a/atom/browser/net/url_request_async_asar_job.h b/atom/browser/net/url_request_async_asar_job.h index 032f3d992413..2cf70d04e911 100644 --- a/atom/browser/net/url_request_async_asar_job.h +++ b/atom/browser/net/url_request_async_asar_job.h @@ -5,6 +5,8 @@ #ifndef ATOM_BROWSER_NET_URL_REQUEST_ASYNC_ASAR_JOB_H_ #define ATOM_BROWSER_NET_URL_REQUEST_ASYNC_ASAR_JOB_H_ +#include + #include "atom/browser/net/asar/url_request_asar_job.h" #include "atom/browser/net/js_asker.h" diff --git a/atom/browser/net/url_request_buffer_job.cc b/atom/browser/net/url_request_buffer_job.cc index 750099c99a76..974619a0f815 100644 --- a/atom/browser/net/url_request_buffer_job.cc +++ b/atom/browser/net/url_request_buffer_job.cc @@ -4,6 +4,7 @@ #include "atom/browser/net/url_request_buffer_job.h" +#include #include #include "atom/common/atom_constants.h" diff --git a/atom/browser/net/url_request_buffer_job.h b/atom/browser/net/url_request_buffer_job.h index a9f72e0b2b28..69474753baa0 100644 --- a/atom/browser/net/url_request_buffer_job.h +++ b/atom/browser/net/url_request_buffer_job.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_NET_URL_REQUEST_BUFFER_JOB_H_ #define ATOM_BROWSER_NET_URL_REQUEST_BUFFER_JOB_H_ +#include #include #include "atom/browser/net/js_asker.h" diff --git a/atom/browser/net/url_request_fetch_job.cc b/atom/browser/net/url_request_fetch_job.cc index 68539433f4de..e86c984a574e 100644 --- a/atom/browser/net/url_request_fetch_job.cc +++ b/atom/browser/net/url_request_fetch_job.cc @@ -5,6 +5,7 @@ #include "atom/browser/net/url_request_fetch_job.h" #include +#include #include #include "atom/browser/api/atom_api_session.h" diff --git a/atom/browser/net/url_request_fetch_job.h b/atom/browser/net/url_request_fetch_job.h index c38be1cbf86c..62af6178fa48 100644 --- a/atom/browser/net/url_request_fetch_job.h +++ b/atom/browser/net/url_request_fetch_job.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_NET_URL_REQUEST_FETCH_JOB_H_ #define ATOM_BROWSER_NET_URL_REQUEST_FETCH_JOB_H_ +#include #include #include "atom/browser/net/js_asker.h" diff --git a/atom/browser/net/url_request_stream_job.cc b/atom/browser/net/url_request_stream_job.cc index f52e2822df8a..feca73187538 100644 --- a/atom/browser/net/url_request_stream_job.cc +++ b/atom/browser/net/url_request_stream_job.cc @@ -2,11 +2,14 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include "atom/browser/net/url_request_stream_job.h" + #include +#include #include #include +#include -#include "atom/browser/net/url_request_stream_job.h" #include "atom/common/api/event_emitter_caller.h" #include "atom/common/atom_constants.h" #include "atom/common/native_mate_converters/net_converter.h" diff --git a/atom/browser/net/url_request_stream_job.h b/atom/browser/net/url_request_stream_job.h index 742ded7f1b95..19f98a0f97c8 100644 --- a/atom/browser/net/url_request_stream_job.h +++ b/atom/browser/net/url_request_stream_job.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_NET_URL_REQUEST_STREAM_JOB_H_ #include +#include #include #include "atom/browser/api/event_subscriber.h" diff --git a/atom/browser/net/url_request_string_job.cc b/atom/browser/net/url_request_string_job.cc index 31381ff11866..ef6422a57de6 100644 --- a/atom/browser/net/url_request_string_job.cc +++ b/atom/browser/net/url_request_string_job.cc @@ -4,6 +4,7 @@ #include "atom/browser/net/url_request_string_job.h" +#include #include #include "atom/common/atom_constants.h" diff --git a/atom/browser/net/url_request_string_job.h b/atom/browser/net/url_request_string_job.h index 841deb254d8f..6f0ff3fbc2ea 100644 --- a/atom/browser/net/url_request_string_job.h +++ b/atom/browser/net/url_request_string_job.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_NET_URL_REQUEST_STRING_JOB_H_ #define ATOM_BROWSER_NET_URL_REQUEST_STRING_JOB_H_ +#include #include #include "atom/browser/net/js_asker.h" diff --git a/atom/browser/osr/osr_output_device.h b/atom/browser/osr/osr_output_device.h index 4c62414fd0c5..c38c8f3f2c5b 100644 --- a/atom/browser/osr/osr_output_device.h +++ b/atom/browser/osr/osr_output_device.h @@ -5,6 +5,8 @@ #ifndef ATOM_BROWSER_OSR_OSR_OUTPUT_DEVICE_H_ #define ATOM_BROWSER_OSR_OSR_OUTPUT_DEVICE_H_ +#include + #include "base/callback.h" #include "components/viz/service/display/software_output_device.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/atom/browser/osr/osr_render_widget_host_view.h b/atom/browser/osr/osr_render_widget_host_view.h index 79ddc102d918..f2b5f2a52243 100644 --- a/atom/browser/osr/osr_render_widget_host_view.h +++ b/atom/browser/osr/osr_render_widget_host_view.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ #define ATOM_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ +#include #include #include #include diff --git a/atom/browser/osr/osr_view_proxy.h b/atom/browser/osr/osr_view_proxy.h index 02c491ed6096..41bb7474c60e 100644 --- a/atom/browser/osr/osr_view_proxy.h +++ b/atom/browser/osr/osr_view_proxy.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_OSR_OSR_VIEW_PROXY_H_ #define ATOM_BROWSER_OSR_OSR_VIEW_PROXY_H_ +#include #include #include "third_party/skia/include/core/SkBitmap.h" diff --git a/atom/browser/relauncher.cc b/atom/browser/relauncher.cc index 35c6785e3d87..b0b7925aedef 100644 --- a/atom/browser/relauncher.cc +++ b/atom/browser/relauncher.cc @@ -5,6 +5,7 @@ #include "atom/browser/relauncher.h" #include +#include #include #include "atom/common/atom_command_line.h" diff --git a/atom/browser/request_context_delegate.cc b/atom/browser/request_context_delegate.cc index 2bc44804878d..4056d6fee9cb 100644 --- a/atom/browser/request_context_delegate.cc +++ b/atom/browser/request_context_delegate.cc @@ -4,6 +4,9 @@ #include "atom/browser/request_context_delegate.h" +#include +#include + #include "atom/browser/api/atom_api_protocol.h" #include "atom/browser/net/about_protocol_handler.h" #include "atom/browser/net/asar/asar_protocol_handler.h" diff --git a/atom/browser/request_context_delegate.h b/atom/browser/request_context_delegate.h index 7a6200a439f7..3b97b0fe7ad1 100644 --- a/atom/browser/request_context_delegate.h +++ b/atom/browser/request_context_delegate.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_REQUEST_CONTEXT_DELEGATE_H_ #define ATOM_BROWSER_REQUEST_CONTEXT_DELEGATE_H_ +#include #include #include diff --git a/atom/browser/ui/tray_icon_gtk.h b/atom/browser/ui/tray_icon_gtk.h index cddd0c4b8927..db4382623aba 100644 --- a/atom/browser/ui/tray_icon_gtk.h +++ b/atom/browser/ui/tray_icon_gtk.h @@ -5,6 +5,7 @@ #ifndef ATOM_BROWSER_UI_TRAY_ICON_GTK_H_ #define ATOM_BROWSER_UI_TRAY_ICON_GTK_H_ +#include #include #include "atom/browser/ui/tray_icon.h" diff --git a/atom/browser/ui/views/autofill_popup_view.cc b/atom/browser/ui/views/autofill_popup_view.cc index e215f0248733..0265570b96bc 100644 --- a/atom/browser/ui/views/autofill_popup_view.cc +++ b/atom/browser/ui/views/autofill_popup_view.cc @@ -3,6 +3,9 @@ // found in the LICENSE file. #include "atom/browser/ui/views/autofill_popup_view.h" + +#include + #include "base/bind.h" #include "base/i18n/rtl.h" #include "cc/paint/skia_paint_canvas.h" diff --git a/atom/browser/ui/views/autofill_popup_view.h b/atom/browser/ui/views/autofill_popup_view.h index a1f4ce6a7b06..548a5b47442d 100644 --- a/atom/browser/ui/views/autofill_popup_view.h +++ b/atom/browser/ui/views/autofill_popup_view.h @@ -5,6 +5,8 @@ #ifndef ATOM_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ #define ATOM_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ +#include + #include "atom/browser/ui/autofill_popup.h" #if defined(ENABLE_OSR) diff --git a/atom/browser/ui/views/menu_bar.cc b/atom/browser/ui/views/menu_bar.cc index e838d3cc217b..31ef332c9c04 100644 --- a/atom/browser/ui/views/menu_bar.cc +++ b/atom/browser/ui/views/menu_bar.cc @@ -4,6 +4,8 @@ #include "atom/browser/ui/views/menu_bar.h" +#include + #include "atom/browser/ui/views/menu_delegate.h" #include "atom/browser/ui/views/submenu_button.h" #include "ui/base/models/menu_model.h" diff --git a/atom/browser/ui/views/submenu_button.cc b/atom/browser/ui/views/submenu_button.cc index 1124d3d01471..55b95abe5e8b 100644 --- a/atom/browser/ui/views/submenu_button.cc +++ b/atom/browser/ui/views/submenu_button.cc @@ -4,6 +4,9 @@ #include "atom/browser/ui/views/submenu_button.h" +#include +#include + #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "ui/gfx/canvas.h" diff --git a/atom/browser/ui/views/submenu_button.h b/atom/browser/ui/views/submenu_button.h index d8b7785da131..cdd740ff6e88 100644 --- a/atom/browser/ui/views/submenu_button.h +++ b/atom/browser/ui/views/submenu_button.h @@ -5,6 +5,8 @@ #ifndef ATOM_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ #define ATOM_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ +#include + #include "ui/views/animation/ink_drop_highlight.h" #include "ui/views/controls/button/menu_button.h" diff --git a/atom/browser/ui/webui/pdf_viewer_handler.cc b/atom/browser/ui/webui/pdf_viewer_handler.cc index 39197cdccc99..2e1d1b28d528 100644 --- a/atom/browser/ui/webui/pdf_viewer_handler.cc +++ b/atom/browser/ui/webui/pdf_viewer_handler.cc @@ -4,6 +4,9 @@ #include "atom/browser/ui/webui/pdf_viewer_handler.h" +#include +#include + #include "atom/common/atom_constants.h" #include "base/bind.h" #include "base/values.h" diff --git a/atom/browser/ui/webui/pdf_viewer_handler.h b/atom/browser/ui/webui/pdf_viewer_handler.h index 8f6c333449bc..f2cef7787c57 100644 --- a/atom/browser/ui/webui/pdf_viewer_handler.h +++ b/atom/browser/ui/webui/pdf_viewer_handler.h @@ -9,6 +9,7 @@ #error("This header can only be used when enable_pdf_viewer gyp flag is enabled") // NOLINT #endif // defined(ENABLE_PDF_VIEWER) +#include #include #include "atom/browser/web_contents_zoom_controller.h" diff --git a/atom/browser/ui/webui/pdf_viewer_ui.cc b/atom/browser/ui/webui/pdf_viewer_ui.cc index 7d1f547356c4..6d670af5f078 100644 --- a/atom/browser/ui/webui/pdf_viewer_ui.cc +++ b/atom/browser/ui/webui/pdf_viewer_ui.cc @@ -5,6 +5,8 @@ #include "atom/browser/ui/webui/pdf_viewer_ui.h" #include +#include +#include #include "atom/browser/atom_browser_context.h" #include "atom/browser/loader/layered_resource_handler.h" diff --git a/atom/browser/ui/webui/pdf_viewer_ui.h b/atom/browser/ui/webui/pdf_viewer_ui.h index 75bf58d239dd..5f58d73b5f86 100644 --- a/atom/browser/ui/webui/pdf_viewer_ui.h +++ b/atom/browser/ui/webui/pdf_viewer_ui.h @@ -9,6 +9,7 @@ #error("This header can only be used when enable_pdf_viewer gyp flag is enabled") // NOLINT #endif // defined(ENABLE_PDF_VIEWER) +#include #include #include "base/macros.h" diff --git a/atom/browser/ui/win/notify_icon.h b/atom/browser/ui/win/notify_icon.h index bd4c17d2fcee..12c8bd67bd52 100644 --- a/atom/browser/ui/win/notify_icon.h +++ b/atom/browser/ui/win/notify_icon.h @@ -9,6 +9,7 @@ #include +#include #include #include "atom/browser/ui/tray_icon.h" diff --git a/atom/browser/ui/x/event_disabler.cc b/atom/browser/ui/x/event_disabler.cc index 249ded7af268..2e2ebd97297f 100644 --- a/atom/browser/ui/x/event_disabler.cc +++ b/atom/browser/ui/x/event_disabler.cc @@ -4,6 +4,8 @@ #include "atom/browser/ui/x/event_disabler.h" +#include + namespace atom { EventDisabler::EventDisabler() {} diff --git a/atom/browser/ui/x/event_disabler.h b/atom/browser/ui/x/event_disabler.h index 9a6645bcdca3..01a7cab37508 100644 --- a/atom/browser/ui/x/event_disabler.h +++ b/atom/browser/ui/x/event_disabler.h @@ -5,6 +5,8 @@ #ifndef ATOM_BROWSER_UI_X_EVENT_DISABLER_H_ #define ATOM_BROWSER_UI_X_EVENT_DISABLER_H_ +#include + #include "base/macros.h" #include "ui/events/event_rewriter.h" diff --git a/atom/browser/ui/x/x_window_utils.cc b/atom/browser/ui/x/x_window_utils.cc index ecc2f906e584..64aa8596a437 100644 --- a/atom/browser/ui/x/x_window_utils.cc +++ b/atom/browser/ui/x/x_window_utils.cc @@ -5,6 +5,7 @@ #include "atom/browser/ui/x/x_window_utils.h" #include +#include #include "base/environment.h" #include "base/strings/string_util.h" diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index c21c93383155..b0e4228e8570 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -6,6 +6,7 @@ #include #include +#include #include #include "atom/browser/native_window.h" diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 09edfdaac910..d7293bf9b79b 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -4,7 +4,9 @@ #include "atom/common/api/atom_api_native_image.h" +#include #include +#include #include #include "atom/common/asar/asar_util.h" diff --git a/atom/common/api/atom_bindings.h b/atom/common/api/atom_bindings.h index 592ca08ba383..9ae736fe160b 100644 --- a/atom/common/api/atom_bindings.h +++ b/atom/common/api/atom_bindings.h @@ -6,6 +6,7 @@ #define ATOM_COMMON_API_ATOM_BINDINGS_H_ #include +#include #include "base/macros.h" #include "base/process/process_metrics.h" diff --git a/atom/common/asar/archive.cc b/atom/common/asar/archive.cc index 9b37f94a4dc4..1241ce868b4f 100644 --- a/atom/common/asar/archive.cc +++ b/atom/common/asar/archive.cc @@ -5,6 +5,7 @@ #include "atom/common/asar/archive.h" #include +#include #include #include "atom/common/asar/scoped_temporary_file.h" diff --git a/atom/common/crash_reporter/crash_reporter_mac.h b/atom/common/crash_reporter/crash_reporter_mac.h index 359875319d6e..7a68a4389b1e 100644 --- a/atom/common/crash_reporter/crash_reporter_mac.h +++ b/atom/common/crash_reporter/crash_reporter_mac.h @@ -6,6 +6,7 @@ #define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_MAC_H_ #include +#include #include #include diff --git a/atom/common/native_mate_converters/net_converter.cc b/atom/common/native_mate_converters/net_converter.cc index db54210e7c09..e805d3e859d9 100644 --- a/atom/common/native_mate_converters/net_converter.cc +++ b/atom/common/native_mate_converters/net_converter.cc @@ -5,6 +5,8 @@ #include "atom/common/native_mate_converters/net_converter.h" #include +#include +#include #include #include "atom/common/native_mate_converters/gurl_converter.h" diff --git a/atom/common/native_mate_converters/network_converter.cc b/atom/common/native_mate_converters/network_converter.cc index 61a6563a6170..8917b2f66b51 100644 --- a/atom/common/native_mate_converters/network_converter.cc +++ b/atom/common/native_mate_converters/network_converter.cc @@ -4,6 +4,7 @@ #include "atom/common/native_mate_converters/network_converter.h" +#include #include #include #include diff --git a/atom/common/native_mate_converters/value_converter.cc b/atom/common/native_mate_converters/value_converter.cc index a71cc70f83d2..309edb14afc7 100644 --- a/atom/common/native_mate_converters/value_converter.cc +++ b/atom/common/native_mate_converters/value_converter.cc @@ -4,6 +4,8 @@ #include "atom/common/native_mate_converters/value_converter.h" +#include + #include "atom/common/native_mate_converters/v8_value_converter.h" #include "base/values.h" diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index 52589228aa51..c4cdf5692f17 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -5,6 +5,7 @@ #include "atom/common/node_bindings.h" #include +#include #include #include diff --git a/atom/renderer/api/atom_api_spell_check_client.h b/atom/renderer/api/atom_api_spell_check_client.h index b908571429ab..79dc8ffe3e70 100644 --- a/atom/renderer/api/atom_api_spell_check_client.h +++ b/atom/renderer/api/atom_api_spell_check_client.h @@ -5,6 +5,7 @@ #ifndef ATOM_RENDERER_API_ATOM_API_SPELL_CHECK_CLIENT_H_ #define ATOM_RENDERER_API_ATOM_API_SPELL_CHECK_CLIENT_H_ +#include #include #include diff --git a/atom/renderer/atom_renderer_client.h b/atom/renderer/atom_renderer_client.h index 3e81cd4c647b..d3d920df956a 100644 --- a/atom/renderer/atom_renderer_client.h +++ b/atom/renderer/atom_renderer_client.h @@ -5,6 +5,7 @@ #ifndef ATOM_RENDERER_ATOM_RENDERER_CLIENT_H_ #define ATOM_RENDERER_ATOM_RENDERER_CLIENT_H_ +#include #include #include #include diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc index 397f96e60d28..d312d4c9cac2 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.cc +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -30,8 +30,8 @@ namespace atom { namespace { -const std::string kIpcKey = "ipcNative"; -const std::string kModuleCacheKey = "native-module-cache"; +const char kIpcKey[] = "ipcNative"; +const char kModuleCacheKey[] = "native-module-cache"; bool IsDevTools(content::RenderFrame* render_frame) { return render_frame->GetWebFrame()->GetDocument().Url().ProtocolIs( diff --git a/atom/renderer/atom_sandboxed_renderer_client.h b/atom/renderer/atom_sandboxed_renderer_client.h index 4afef42dfd43..ca71a94702bc 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.h +++ b/atom/renderer/atom_sandboxed_renderer_client.h @@ -4,6 +4,7 @@ #ifndef ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_ #define ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_ +#include #include #include diff --git a/atom/renderer/guest_view_container.cc b/atom/renderer/guest_view_container.cc index 6ad5cd0703f5..294bfda5f196 100644 --- a/atom/renderer/guest_view_container.cc +++ b/atom/renderer/guest_view_container.cc @@ -5,6 +5,7 @@ #include "atom/renderer/guest_view_container.h" #include +#include #include "base/bind.h" #include "base/lazy_instance.h" diff --git a/atom/renderer/renderer_client_base.cc b/atom/renderer/renderer_client_base.cc index 5fdf01b1beb8..907e564332b5 100644 --- a/atom/renderer/renderer_client_base.cc +++ b/atom/renderer/renderer_client_base.cc @@ -4,6 +4,7 @@ #include "atom/renderer/renderer_client_base.h" +#include #include #include diff --git a/atom/renderer/renderer_client_base.h b/atom/renderer/renderer_client_base.h index 4b7fed6f59e3..40991de2c5c2 100644 --- a/atom/renderer/renderer_client_base.h +++ b/atom/renderer/renderer_client_base.h @@ -5,6 +5,7 @@ #ifndef ATOM_RENDERER_RENDERER_CLIENT_BASE_H_ #define ATOM_RENDERER_RENDERER_CLIENT_BASE_H_ +#include #include #include diff --git a/atom/renderer/web_worker_observer.h b/atom/renderer/web_worker_observer.h index 45ccfc3dc968..3b83a46e2ae3 100644 --- a/atom/renderer/web_worker_observer.h +++ b/atom/renderer/web_worker_observer.h @@ -5,6 +5,8 @@ #ifndef ATOM_RENDERER_WEB_WORKER_OBSERVER_H_ #define ATOM_RENDERER_WEB_WORKER_OBSERVER_H_ +#include + #include "base/macros.h" #include "v8/include/v8.h" diff --git a/brightray/browser/browser_client.cc b/brightray/browser/browser_client.cc index 93b8cef96d4f..1b8a56232f52 100644 --- a/brightray/browser/browser_client.cc +++ b/brightray/browser/browser_client.cc @@ -5,6 +5,7 @@ #include "brightray/browser/browser_client.h" #include "base/lazy_instance.h" +#include "base/no_destructor.h" #include "base/path_service.h" #include "brightray/browser/browser_context.h" #include "brightray/browser/browser_main_parts.h" @@ -26,7 +27,8 @@ BrowserClient* g_browser_client; base::LazyInstance::DestructorAtExit g_io_thread_application_locale = LAZY_INSTANCE_INITIALIZER; -std::string g_application_locale; +base::NoDestructor g_application_locale; + void SetApplicationLocaleOnIOThread(const std::string& locale) { DCHECK_CURRENTLY_ON(BrowserThread::IO); @@ -45,7 +47,7 @@ void BrowserClient::SetApplicationLocale(const std::string& locale) { base::BindOnce(&SetApplicationLocaleOnIOThread, locale))) { g_io_thread_application_locale.Get() = locale; } - g_application_locale = locale; + *g_application_locale = locale; } BrowserClient* BrowserClient::Get() { @@ -127,7 +129,7 @@ content::DevToolsManagerDelegate* BrowserClient::GetDevToolsManagerDelegate() { std::string BrowserClient::GetApplicationLocale() { if (BrowserThread::CurrentlyOn(BrowserThread::IO)) return g_io_thread_application_locale.Get(); - return g_application_locale; + return *g_application_locale; } } // namespace brightray diff --git a/brightray/browser/browser_client.h b/brightray/browser/browser_client.h index 643e493f43fe..052dd9576896 100644 --- a/brightray/browser/browser_client.h +++ b/brightray/browser/browser_client.h @@ -5,6 +5,7 @@ #ifndef BRIGHTRAY_BROWSER_BROWSER_CLIENT_H_ #define BRIGHTRAY_BROWSER_BROWSER_CLIENT_H_ +#include #include #include diff --git a/brightray/browser/browser_context.cc b/brightray/browser/browser_context.cc index 1eff7344e9ae..0fede966b3ef 100644 --- a/brightray/browser/browser_context.cc +++ b/brightray/browser/browser_context.cc @@ -4,6 +4,9 @@ #include "brightray/browser/browser_context.h" +#include +#include + #include "base/files/file_path.h" #include "base/path_service.h" #include "base/strings/string_util.h" diff --git a/brightray/browser/browser_context.h b/brightray/browser/browser_context.h index 1fb1c59b8043..78b7b5044919 100644 --- a/brightray/browser/browser_context.h +++ b/brightray/browser/browser_context.h @@ -6,6 +6,7 @@ #define BRIGHTRAY_BROWSER_BROWSER_CONTEXT_H_ #include +#include #include #include "base/memory/ref_counted.h" diff --git a/brightray/browser/browser_main_parts.cc b/brightray/browser/browser_main_parts.cc index 4f66e6023197..66641d2a3cfd 100644 --- a/brightray/browser/browser_main_parts.cc +++ b/brightray/browser/browser_main_parts.cc @@ -10,6 +10,7 @@ #include #include +#include #if defined(OS_LINUX) #include // for g_setenv() diff --git a/brightray/browser/devtools_manager_delegate.cc b/brightray/browser/devtools_manager_delegate.cc index f821a8780387..53ee9c4f818b 100644 --- a/brightray/browser/devtools_manager_delegate.cc +++ b/brightray/browser/devtools_manager_delegate.cc @@ -4,6 +4,7 @@ #include "brightray/browser/devtools_manager_delegate.h" +#include #include #include "base/bind.h" diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index fe002c3668f2..53f66b7dd2ef 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -3,6 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. +#include #include #include "brightray/browser/inspectable_web_contents_impl.h" diff --git a/brightray/browser/inspectable_web_contents_impl.h b/brightray/browser/inspectable_web_contents_impl.h index f0bddba7756c..c2b06e74a7a4 100644 --- a/brightray/browser/inspectable_web_contents_impl.h +++ b/brightray/browser/inspectable_web_contents_impl.h @@ -7,6 +7,7 @@ #define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_IMPL_H_ #include +#include #include #include diff --git a/brightray/browser/media/media_stream_devices_controller.cc b/brightray/browser/media/media_stream_devices_controller.cc index c5fdd04fc3b6..d855e2d0ca45 100644 --- a/brightray/browser/media/media_stream_devices_controller.cc +++ b/brightray/browser/media/media_stream_devices_controller.cc @@ -4,6 +4,8 @@ #include "brightray/browser/media/media_stream_devices_controller.h" +#include + #include "brightray/browser/media/media_capture_devices_dispatcher.h" #include "content/public/browser/desktop_media_id.h" #include "content/public/common/media_stream_request.h" diff --git a/brightray/browser/net_log.h b/brightray/browser/net_log.h index ffeb85f78a96..0b95ed4f2bdd 100644 --- a/brightray/browser/net_log.h +++ b/brightray/browser/net_log.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_NET_LOG_H_ #define BRIGHTRAY_BROWSER_NET_LOG_H_ +#include + #include "base/callback.h" #include "base/files/file_path.h" #include "net/log/net_log.h" diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index 07bd588b51d1..64e907dbe6c4 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -5,6 +5,8 @@ #include "brightray/browser/url_request_context_getter.h" #include +#include +#include #include "base/command_line.h" #include "base/memory/ptr_util.h" diff --git a/brightray/browser/url_request_context_getter.h b/brightray/browser/url_request_context_getter.h index 941a5782b14a..ec875a25d853 100644 --- a/brightray/browser/url_request_context_getter.h +++ b/brightray/browser/url_request_context_getter.h @@ -5,6 +5,7 @@ #ifndef BRIGHTRAY_BROWSER_URL_REQUEST_CONTEXT_GETTER_H_ #define BRIGHTRAY_BROWSER_URL_REQUEST_CONTEXT_GETTER_H_ +#include #include #include diff --git a/brightray/browser/views/inspectable_web_contents_view_views.h b/brightray/browser/views/inspectable_web_contents_view_views.h index fa501efd91ea..0ed703b541e0 100644 --- a/brightray/browser/views/inspectable_web_contents_view_views.h +++ b/brightray/browser/views/inspectable_web_contents_view_views.h @@ -1,6 +1,8 @@ #ifndef BRIGHTRAY_BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ #define BRIGHTRAY_BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ +#include + #include "base/compiler_specific.h" #include "brightray/browser/inspectable_web_contents_view.h" #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" diff --git a/brightray/browser/views/views_delegate.cc b/brightray/browser/views/views_delegate.cc index 233a595eb38a..97f3fba7fff0 100644 --- a/brightray/browser/views/views_delegate.cc +++ b/brightray/browser/views/views_delegate.cc @@ -4,6 +4,8 @@ #include "brightray/browser/views/views_delegate.h" +#include + #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" #include "ui/views/widget/native_widget_aura.h" diff --git a/brightray/browser/win/notification_presenter_win.cc b/brightray/browser/win/notification_presenter_win.cc index cd002b9ac140..4687bba1742e 100644 --- a/brightray/browser/win/notification_presenter_win.cc +++ b/brightray/browser/win/notification_presenter_win.cc @@ -6,6 +6,7 @@ #include "brightray/browser/win/notification_presenter_win.h" +#include #include #include diff --git a/brightray/browser/win/win32_desktop_notifications/toast.cc b/brightray/browser/win/win32_desktop_notifications/toast.cc index 990ba63bcd6a..d550d4d76b8b 100644 --- a/brightray/browser/win/win32_desktop_notifications/toast.cc +++ b/brightray/browser/win/win32_desktop_notifications/toast.cc @@ -9,6 +9,7 @@ #include #include #include +#include #include "base/logging.h" #include "brightray/browser/win/win32_desktop_notifications/common.h" diff --git a/brightray/browser/win/win32_notification.cc b/brightray/browser/win/win32_notification.cc index adeb55656b51..db7714b214b8 100644 --- a/brightray/browser/win/win32_notification.cc +++ b/brightray/browser/win/win32_notification.cc @@ -6,6 +6,7 @@ #include #include +#include #include #include "third_party/skia/include/core/SkBitmap.h" diff --git a/brightray/browser/zoom_level_delegate.h b/brightray/browser/zoom_level_delegate.h index d3a9424a3452..84021264d731 100644 --- a/brightray/browser/zoom_level_delegate.h +++ b/brightray/browser/zoom_level_delegate.h @@ -5,6 +5,7 @@ #ifndef BRIGHTRAY_BROWSER_ZOOM_LEVEL_DELEGATE_H_ #define BRIGHTRAY_BROWSER_ZOOM_LEVEL_DELEGATE_H_ +#include #include #include "base/files/file_path.h" diff --git a/brightray/common/application_info.cc b/brightray/common/application_info.cc index 271dd10f81e3..5876b265f159 100644 --- a/brightray/common/application_info.cc +++ b/brightray/common/application_info.cc @@ -1,28 +1,29 @@ +#include "base/no_destructor.h" #include "brightray/common/application_info.h" namespace brightray { namespace { -std::string g_overridden_application_name; -std::string g_overridden_application_version; +base::NoDestructor g_overridden_application_name; +base::NoDestructor g_overridden_application_version; } // namespace // name void OverrideApplicationName(const std::string& name) { - g_overridden_application_name = name; + *g_overridden_application_name = name; } std::string GetOverriddenApplicationName() { - return g_overridden_application_name; + return *g_overridden_application_name; } // version void OverrideApplicationVersion(const std::string& version) { - g_overridden_application_version = version; + *g_overridden_application_version = version; } std::string GetOverriddenApplicationVersion() { - return g_overridden_application_version; + return *g_overridden_application_version; } } // namespace brightray