Browse Source

chore: node_includes header no longer needs to be at the end of the list (#17090)

Until one of the latest version of node, the definition of the DISALLOW_COPY_AND_ASSIGN macro in node was different than in chromium. That is no longer the case, so just undefining the macro in node_includes.h works.
Nitish Sakhawalkar 6 years ago
parent
commit
e77d065875
51 changed files with 52 additions and 113 deletions
  1. 1 2
      atom/app/node_main.cc
  2. 1 6
      atom/browser/api/atom_api_app.cc
  3. 1 2
      atom/browser/api/atom_api_browser_window.cc
  4. 1 2
      atom/browser/api/atom_api_content_tracing.cc
  5. 1 2
      atom/browser/api/atom_api_debugger.cc
  6. 1 2
      atom/browser/api/atom_api_desktop_capturer.cc
  7. 1 2
      atom/browser/api/atom_api_dialog.cc
  8. 1 2
      atom/browser/api/atom_api_download_item.cc
  9. 1 2
      atom/browser/api/atom_api_global_shortcut.cc
  10. 1 2
      atom/browser/api/atom_api_in_app_purchase.cc
  11. 1 2
      atom/browser/api/atom_api_menu.cc
  12. 1 2
      atom/browser/api/atom_api_menu_mac.mm
  13. 1 2
      atom/browser/api/atom_api_net_log.cc
  14. 1 3
      atom/browser/api/atom_api_notification.cc
  15. 1 2
      atom/browser/api/atom_api_power_monitor.cc
  16. 1 2
      atom/browser/api/atom_api_power_save_blocker.cc
  17. 1 2
      atom/browser/api/atom_api_render_process_preferences.cc
  18. 1 2
      atom/browser/api/atom_api_screen.cc
  19. 1 2
      atom/browser/api/atom_api_session.cc
  20. 1 2
      atom/browser/api/atom_api_top_level_window.cc
  21. 1 2
      atom/browser/api/atom_api_view.cc
  22. 1 2
      atom/browser/api/atom_api_web_contents.cc
  23. 1 2
      atom/browser/api/atom_api_web_contents_view.cc
  24. 1 4
      atom/browser/api/atom_api_web_view_manager.cc
  25. 1 2
      atom/browser/api/event_emitter.cc
  26. 1 2
      atom/browser/api/frame_subscriber.cc
  27. 1 2
      atom/browser/api/stream_subscriber.cc
  28. 1 2
      atom/browser/api/views/atom_api_box_layout.cc
  29. 1 2
      atom/browser/api/views/atom_api_button.cc
  30. 1 2
      atom/browser/api/views/atom_api_label_button.cc
  31. 1 2
      atom/browser/api/views/atom_api_layout_manager.cc
  32. 1 2
      atom/browser/api/views/atom_api_md_text_button.cc
  33. 1 2
      atom/browser/api/views/atom_api_resize_area.cc
  34. 1 2
      atom/browser/api/views/atom_api_text_field.cc
  35. 1 2
      atom/browser/atom_blob_reader.cc
  36. 1 3
      atom/browser/atom_browser_main_parts.cc
  37. 1 2
      atom/browser/javascript_environment.cc
  38. 1 2
      atom/browser/node_debugger.cc
  39. 1 2
      atom/browser/printing/print_preview_message_handler.cc
  40. 1 2
      atom/common/api/atom_api_asar.cc
  41. 1 2
      atom/common/api/atom_api_clipboard.cc
  42. 1 2
      atom/common/api/atom_api_command_line.cc
  43. 1 2
      atom/common/api/atom_api_native_image.cc
  44. 2 4
      atom/common/api/atom_bindings.cc
  45. 1 3
      atom/common/api/features.cc
  46. 1 2
      atom/common/native_mate_converters/net_converter.cc
  47. 1 2
      atom/common/node_bindings.cc
  48. 1 2
      atom/renderer/api/atom_api_web_frame.cc
  49. 1 2
      atom/renderer/atom_renderer_client.cc
  50. 1 2
      atom/renderer/atom_sandboxed_renderer_client.cc
  51. 1 2
      atom/renderer/web_worker_observer.cc

+ 1 - 2
atom/app/node_main.cc

@@ -15,6 +15,7 @@
 #include "atom/common/crash_reporter/crash_reporter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
 #include "atom/common/node_bindings.h"
+#include "atom/common/node_includes.h"
 #include "base/command_line.h"
 #include "base/feature_list.h"
 #include "base/task/task_scheduler/task_scheduler.h"
@@ -24,8 +25,6 @@
 #include "gin/v8_initializer.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 int NodeMain(int argc, char* argv[]) {

+ 1 - 6
atom/browser/api/atom_api_app.cc

@@ -24,6 +24,7 @@
 #include "atom/common/native_mate_converters/net_converter.h"
 #include "atom/common/native_mate_converters/network_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/options_switches.h"
 #include "base/command_line.h"
 #include "base/environment.h"
@@ -51,12 +52,6 @@
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/gfx/image/image.h"
 
-// clang-format off
-// This header should be declared at the end to avoid
-// redefinition errors.
-#include "atom/common/node_includes.h"  // NOLINT(build/include_alpha)
-// clang-format on
-
 #if defined(OS_WIN)
 #include "atom/browser/ui/win/jump_list.h"
 #include "base/strings/utf_string_conversions.h"

+ 1 - 2
atom/browser/api/atom_api_browser_window.cc

@@ -15,6 +15,7 @@
 #include "atom/common/color_util.h"
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/options_switches.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"  // nogncheck
@@ -25,8 +26,6 @@
 #include "native_mate/dictionary.h"
 #include "ui/gl/gpu_switching_manager.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/browser/api/atom_api_content_tracing.cc

@@ -8,14 +8,13 @@
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/file_path_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/promise_util.h"
 #include "base/bind.h"
 #include "base/files/file_util.h"
 #include "content/public/browser/tracing_controller.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 using content::TracingController;
 
 namespace mate {

+ 1 - 2
atom/browser/api/atom_api_debugger.cc

@@ -10,14 +10,13 @@
 
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/json/json_reader.h"
 #include "base/json/json_writer.h"
 #include "content/public/browser/devtools_agent_host.h"
 #include "content/public/browser/web_contents.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 using content::DevToolsAgentHost;
 
 namespace atom {

+ 1 - 2
atom/browser/api/atom_api_desktop_capturer.cc

@@ -10,6 +10,7 @@
 
 #include "atom/common/api/atom_api_native_image.h"
 #include "atom/common/native_mate_converters/gfx_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_restrictions.h"
@@ -26,8 +27,6 @@
 #include "ui/display/win/display_info.h"
 #endif  // defined(OS_WIN)
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 template <>

+ 1 - 2
atom/browser/api/atom_api_dialog.cc

@@ -16,11 +16,10 @@
 #include "atom/common/native_mate_converters/file_path_converter.h"
 #include "atom/common/native_mate_converters/image_converter.h"
 #include "atom/common/native_mate_converters/net_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/promise_util.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 namespace {
 
 void ShowMessageBox(int type,

+ 1 - 2
atom/browser/api/atom_api_download_item.cc

@@ -11,13 +11,12 @@
 #include "atom/common/native_mate_converters/file_dialog_converter.h"
 #include "atom/common/native_mate_converters/file_path_converter.h"
 #include "atom/common/native_mate_converters/gurl_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "native_mate/dictionary.h"
 #include "net/base/filename_util.h"
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 template <>

+ 1 - 2
atom/browser/api/atom_api_global_shortcut.cc

@@ -10,12 +10,11 @@
 #include "atom/browser/api/atom_api_system_preferences.h"
 #include "atom/common/native_mate_converters/accelerator_converter.h"
 #include "atom/common/native_mate_converters/callback.h"
+#include "atom/common/node_includes.h"
 #include "base/stl_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 #if defined(OS_MACOSX)
 #include "base/mac/mac_util.h"
 #endif

+ 1 - 2
atom/browser/api/atom_api_in_app_purchase.cc

@@ -9,9 +9,8 @@
 #include <vector>
 
 #include "atom/common/native_mate_converters/callback.h"
-#include "native_mate/dictionary.h"
-
 #include "atom/common/node_includes.h"
+#include "native_mate/dictionary.h"
 
 namespace mate {
 

+ 1 - 2
atom/browser/api/atom_api_menu.cc

@@ -9,12 +9,11 @@
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/image_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/node_includes.h"
 #include "native_mate/constructor.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/browser/api/atom_api_menu_mac.mm

@@ -6,6 +6,7 @@
 
 #include "atom/browser/native_window.h"
 #include "atom/browser/unresponsive_suppressor.h"
+#include "atom/common/node_includes.h"
 #include "base/mac/scoped_sending_event.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/sys_string_conversions.h"
@@ -14,8 +15,6 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/web_contents.h"
 
-#include "atom/common/node_includes.h"
-
 using content::BrowserThread;
 
 namespace {

+ 1 - 2
atom/browser/api/atom_api_net_log.cc

@@ -10,6 +10,7 @@
 #include "atom/browser/net/system_network_context_manager.h"
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/file_path_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/command_line.h"
 #include "chrome/browser/browser_process.h"
 #include "components/net_log/chrome_net_log.h"
@@ -18,8 +19,6 @@
 #include "native_mate/handle.h"
 #include "net/url_request/url_request_context_getter.h"
 
-#include "atom/common/node_includes.h"
-
 namespace {
 
 void OnGetFilePathToCompletedLog(const atom::util::CopyablePromise& promise,

+ 1 - 3
atom/browser/api/atom_api_notification.cc

@@ -10,15 +10,13 @@
 #include "atom/common/native_mate_converters/gfx_converter.h"
 #include "atom/common/native_mate_converters/image_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/guid.h"
 #include "base/strings/utf_string_conversions.h"
 #include "native_mate/constructor.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 #include "url/gurl.h"
-// Must be the last in the includes list.
-// See https://github.com/electron/electron/issues/10363
-#include "atom/common/node_includes.h"
 
 namespace mate {
 template <>

+ 1 - 2
atom/browser/api/atom_api_power_monitor.cc

@@ -6,12 +6,11 @@
 
 #include "atom/browser/browser.h"
 #include "atom/common/native_mate_converters/callback.h"
+#include "atom/common/node_includes.h"
 #include "base/power_monitor/power_monitor.h"
 #include "base/power_monitor/power_monitor_device_source.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 template <>
 struct Converter<ui::IdleState> {

+ 1 - 2
atom/browser/api/atom_api_power_save_blocker.cc

@@ -6,6 +6,7 @@
 
 #include <string>
 
+#include "atom/common/node_includes.h"
 #include "base/task/post_task.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "content/public/common/service_manager_connection.h"
@@ -14,8 +15,6 @@
 #include "services/device/public/mojom/wake_lock_provider.mojom.h"
 #include "services/service_manager/public/cpp/connector.h"
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 template <>

+ 1 - 2
atom/browser/api/atom_api_render_process_preferences.cc

@@ -7,12 +7,11 @@
 #include "atom/browser/api/atom_api_web_contents.h"
 #include "atom/browser/atom_browser_client.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "content/public/browser/render_process_host.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/browser/api/atom_api_screen.cc

@@ -10,6 +10,7 @@
 #include "atom/browser/api/atom_api_browser_window.h"
 #include "atom/browser/browser.h"
 #include "atom/common/native_mate_converters/gfx_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/bind.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
@@ -21,8 +22,6 @@
 #include "ui/display/win/screen_win.h"
 #endif
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/browser/api/atom_api_session.cc

@@ -28,6 +28,7 @@
 #include "atom/common/native_mate_converters/gurl_converter.h"
 #include "atom/common/native_mate_converters/net_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/files/file_path.h"
 #include "base/guid.h"
 #include "base/strings/string_number_conversions.h"
@@ -59,8 +60,6 @@
 #include "net/url_request/url_request_context_getter.h"
 #include "ui/base/l10n/l10n_util.h"
 
-#include "atom/common/node_includes.h"
-
 using content::BrowserThread;
 using content::StoragePartition;
 

+ 1 - 2
atom/browser/api/atom_api_top_level_window.cc

@@ -18,6 +18,7 @@
 #include "atom/common/native_mate_converters/image_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/options_switches.h"
 #include "electron/buildflags/buildflags.h"
 #include "gin/converter.h"
@@ -33,8 +34,6 @@
 #include "ui/base/win/shell.h"
 #endif
 
-#include "atom/common/node_includes.h"
-
 #if defined(OS_WIN)
 namespace mate {
 

+ 1 - 2
atom/browser/api/atom_api_view.cc

@@ -4,9 +4,8 @@
 
 #include "atom/browser/api/atom_api_view.h"
 
-#include "native_mate/dictionary.h"
-
 #include "atom/common/node_includes.h"
+#include "native_mate/dictionary.h"
 
 namespace atom {
 

+ 1 - 2
atom/browser/api/atom_api_web_contents.cc

@@ -45,6 +45,7 @@
 #include "atom/common/native_mate_converters/network_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/options_switches.h"
 #include "base/message_loop/message_loop.h"
 #include "base/no_destructor.h"
@@ -106,8 +107,6 @@
 #include "components/printing/common/print_messages.h"
 #endif
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 #if BUILDFLAG(ENABLE_PRINTING)

+ 1 - 2
atom/browser/api/atom_api_web_contents_view.cc

@@ -8,6 +8,7 @@
 #include "atom/browser/browser.h"
 #include "atom/browser/ui/inspectable_web_contents_view.h"
 #include "atom/common/api/constructor.h"
+#include "atom/common/node_includes.h"
 #include "content/public/browser/web_contents_user_data.h"
 #include "native_mate/dictionary.h"
 
@@ -15,8 +16,6 @@
 #include "atom/browser/ui/cocoa/delayed_native_view_host.h"
 #endif
 
-#include "atom/common/node_includes.h"
-
 namespace {
 
 // Used to indicate whether a WebContents already has a view.

+ 1 - 4
atom/browser/api/atom_api_web_view_manager.cc

@@ -7,14 +7,11 @@
 #include "atom/browser/web_view_manager.h"
 #include "atom/common/native_mate_converters/content_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/options_switches.h"
 #include "content/public/browser/browser_context.h"
 #include "native_mate/dictionary.h"
 
-// Must be the last in the includes list.
-// See https://github.com/electron/electron/issues/10363
-#include "atom/common/node_includes.h"
-
 using atom::WebContentsPreferences;
 
 namespace {

+ 1 - 2
atom/browser/api/event_emitter.cc

@@ -5,14 +5,13 @@
 #include "atom/browser/api/event_emitter.h"
 
 #include "atom/browser/api/event.h"
+#include "atom/common/node_includes.h"
 #include "content/public/browser/render_frame_host.h"
 #include "native_mate/arguments.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 #include "ui/events/event_constants.h"
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 namespace {

+ 1 - 2
atom/browser/api/frame_subscriber.cc

@@ -7,14 +7,13 @@
 #include <utility>
 
 #include "atom/common/native_mate_converters/gfx_converter.h"
+#include "atom/common/node_includes.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "media/capture/mojom/video_capture_types.mojom.h"
 #include "ui/gfx/skbitmap_operations.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/browser/api/stream_subscriber.cc

@@ -9,11 +9,10 @@
 #include "atom/browser/net/url_request_stream_job.h"
 #include "atom/common/api/event_emitter_caller.h"
 #include "atom/common/native_mate_converters/callback.h"
+#include "atom/common/node_includes.h"
 #include "base/task/post_task.h"
 #include "content/public/browser/browser_task_traits.h"
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 StreamSubscriber::StreamSubscriber(

+ 1 - 2
atom/browser/api/views/atom_api_box_layout.cc

@@ -8,9 +8,8 @@
 
 #include "atom/browser/api/atom_api_view.h"
 #include "atom/common/api/constructor.h"
-#include "native_mate/dictionary.h"
-
 #include "atom/common/node_includes.h"
+#include "native_mate/dictionary.h"
 
 namespace mate {
 

+ 1 - 2
atom/browser/api/views/atom_api_button.cc

@@ -5,9 +5,8 @@
 #include "atom/browser/api/views/atom_api_button.h"
 
 #include "atom/common/api/constructor.h"
-#include "native_mate/dictionary.h"
-
 #include "atom/common/node_includes.h"
+#include "native_mate/dictionary.h"
 
 namespace atom {
 

+ 1 - 2
atom/browser/api/views/atom_api_label_button.cc

@@ -5,11 +5,10 @@
 #include "atom/browser/api/views/atom_api_label_button.h"
 
 #include "atom/common/api/constructor.h"
+#include "atom/common/node_includes.h"
 #include "base/strings/utf_string_conversions.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/browser/api/views/atom_api_layout_manager.cc

@@ -5,9 +5,8 @@
 #include "atom/browser/api/views/atom_api_layout_manager.h"
 
 #include "atom/common/api/constructor.h"
-#include "native_mate/dictionary.h"
-
 #include "atom/common/node_includes.h"
+#include "native_mate/dictionary.h"
 
 namespace atom {
 

+ 1 - 2
atom/browser/api/views/atom_api_md_text_button.cc

@@ -5,11 +5,10 @@
 #include "atom/browser/api/views/atom_api_md_text_button.h"
 
 #include "atom/common/api/constructor.h"
+#include "atom/common/node_includes.h"
 #include "base/strings/utf_string_conversions.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/browser/api/views/atom_api_resize_area.cc

@@ -5,9 +5,8 @@
 #include "atom/browser/api/views/atom_api_resize_area.h"
 
 #include "atom/common/api/constructor.h"
-#include "native_mate/dictionary.h"
-
 #include "atom/common/node_includes.h"
+#include "native_mate/dictionary.h"
 
 namespace atom {
 

+ 1 - 2
atom/browser/api/views/atom_api_text_field.cc

@@ -5,9 +5,8 @@
 #include "atom/browser/api/views/atom_api_text_field.h"
 
 #include "atom/common/api/constructor.h"
-#include "native_mate/dictionary.h"
-
 #include "atom/common/node_includes.h"
+#include "native_mate/dictionary.h"
 
 namespace atom {
 

+ 1 - 2
atom/browser/atom_blob_reader.cc

@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "atom/common/node_includes.h"
 #include "base/task/post_task.h"
 #include "content/browser/blob_storage/chrome_blob_storage_context.h"  // nogncheck
 #include "content/public/browser/browser_task_traits.h"
@@ -16,8 +17,6 @@
 #include "storage/browser/blob/blob_reader.h"
 #include "storage/browser/blob/blob_storage_context.h"
 
-#include "atom/common/node_includes.h"
-
 using content::BrowserThread;
 
 namespace atom {

+ 1 - 3
atom/browser/atom_browser_main_parts.cc

@@ -27,6 +27,7 @@
 #include "atom/common/application_info.h"
 #include "atom/common/asar/asar_util.h"
 #include "atom/common/node_bindings.h"
+#include "atom/common/node_includes.h"
 #include "base/base_switches.h"
 #include "base/command_line.h"
 #include "base/feature_list.h"
@@ -90,9 +91,6 @@
 #include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h"
 #endif
 
-// Must be included after all other headers.
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace {

+ 1 - 2
atom/browser/javascript_environment.cc

@@ -7,6 +7,7 @@
 #include <string>
 
 #include "atom/browser/microtasks_runner.h"
+#include "atom/common/node_includes.h"
 #include "base/command_line.h"
 #include "base/message_loop/message_loop.h"
 #include "base/task/task_scheduler/initialization_util.h"
@@ -14,8 +15,6 @@
 #include "content/public/common/content_switches.h"
 #include "gin/array_buffer.h"
 #include "gin/v8_initializer.h"
-
-#include "atom/common/node_includes.h"
 #include "tracing/trace_event.h"
 
 namespace atom {

+ 1 - 2
atom/browser/node_debugger.cc

@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+#include "atom/common/node_includes.h"
 #include "base/command_line.h"
 #include "base/logging.h"
 #include "base/strings/string_util.h"
@@ -15,8 +16,6 @@
 #include "libplatform/libplatform.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 NodeDebugger::NodeDebugger(node::Environment* env) : env_(env) {}

+ 1 - 2
atom/browser/printing/print_preview_message_handler.cc

@@ -7,6 +7,7 @@
 #include <memory>
 #include <utility>
 
+#include "atom/common/node_includes.h"
 #include "base/bind.h"
 #include "base/memory/read_only_shared_memory_region.h"
 #include "base/memory/ref_counted.h"
@@ -24,8 +25,6 @@
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents.h"
 
-#include "atom/common/node_includes.h"
-
 using content::BrowserThread;
 
 namespace atom {

+ 1 - 2
atom/common/api/atom_api_asar.cc

@@ -9,12 +9,11 @@
 #include "atom/common/asar/archive.h"
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/file_path_converter.h"
+#include "atom/common/node_includes.h"
 #include "native_mate/arguments.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 #include "native_mate/wrappable.h"
-
-#include "atom/common/node_includes.h"
 #include "third_party/electron_node/src/node_native_module.h"
 
 namespace {

+ 1 - 2
atom/common/api/atom_api_clipboard.cc

@@ -6,6 +6,7 @@
 
 #include "atom/common/native_mate_converters/image_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/strings/utf_string_conversions.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkImageInfo.h"
@@ -13,8 +14,6 @@
 #include "ui/base/clipboard/clipboard_format_type.h"
 #include "ui/base/clipboard/scoped_clipboard_writer.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 1 - 2
atom/common/api/atom_api_command_line.cc

@@ -4,6 +4,7 @@
 
 #include "atom/common/native_mate_converters/file_path_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/strings/string_util.h"
@@ -11,8 +12,6 @@
 #include "native_mate/dictionary.h"
 #include "services/network/public/cpp/network_switches.h"
 
-#include "atom/common/node_includes.h"
-
 namespace {
 
 bool HasSwitch(const std::string& name) {

+ 1 - 2
atom/common/api/atom_api_native_image.cc

@@ -14,6 +14,7 @@
 #include "atom/common/native_mate_converters/gfx_converter.h"
 #include "atom/common/native_mate_converters/gurl_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/files/file_util.h"
 #include "base/strings/pattern.h"
 #include "base/strings/string_util.h"
@@ -38,8 +39,6 @@
 #include "ui/gfx/icon_util.h"
 #endif
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace api {

+ 2 - 4
atom/common/api/atom_bindings.cc

@@ -17,6 +17,8 @@
 #include "atom/common/heap_snapshot.h"
 #include "atom/common/native_mate_converters/file_path_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/node_includes.h"
+#include "atom/common/promise_util.h"
 #include "base/logging.h"
 #include "base/process/process.h"
 #include "base/process/process_handle.h"
@@ -28,10 +30,6 @@
 #include "services/resource_coordinator/public/cpp/memory_instrumentation/global_memory_dump.h"
 #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
 
-// Must be the last in the includes list, otherwise the definition of chromium
-// macros conflicts with node macros.
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace {

+ 1 - 3
atom/common/api/features.cc

@@ -2,12 +2,10 @@
 // Use of this source code is governed by the MIT license that can be
 // found in the LICENSE file.
 
+#include "atom/common/node_includes.h"
 #include "electron/buildflags/buildflags.h"
 #include "native_mate/dictionary.h"
 #include "printing/buildflags/buildflags.h"
-// clang-format off
-#include "atom/common/node_includes.h"  // NOLINT(build/include_alpha)
-// clang-format on
 
 namespace {
 

+ 1 - 2
atom/common/native_mate_converters/net_converter.cc

@@ -11,6 +11,7 @@
 
 #include "atom/common/native_mate_converters/gurl_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/values.h"
@@ -25,8 +26,6 @@
 #include "net/url_request/url_request.h"
 #include "storage/browser/blob/upload_blob_element_reader.h"
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 namespace {

+ 1 - 2
atom/common/node_bindings.cc

@@ -14,6 +14,7 @@
 #include "atom/common/api/locker.h"
 #include "atom/common/atom_command_line.h"
 #include "atom/common/native_mate_converters/file_path_converter.h"
+#include "atom/common/node_includes.h"
 #include "base/base_paths.h"
 #include "base/command_line.h"
 #include "base/environment.h"
@@ -28,8 +29,6 @@
 #include "electron/buildflags/buildflags.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/node_includes.h"
-
 #define ELECTRON_BUILTIN_MODULES(V)          \
   V(atom_browser_app)                        \
   V(atom_browser_auto_updater)               \

+ 1 - 2
atom/renderer/api/atom_api_web_frame.cc

@@ -13,6 +13,7 @@
 #include "atom/common/native_mate_converters/callback.h"
 #include "atom/common/native_mate_converters/gfx_converter.h"
 #include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/node_includes.h"
 #include "atom/renderer/api/atom_api_spell_check_client.h"
 #include "base/memory/memory_pressure_listener.h"
 #include "content/public/renderer/render_frame.h"
@@ -35,8 +36,6 @@
 #include "third_party/blink/public/web/web_view.h"
 #include "url/url_util.h"
 
-#include "atom/common/node_includes.h"
-
 namespace mate {
 
 template <>

+ 1 - 2
atom/renderer/atom_renderer_client.cc

@@ -11,6 +11,7 @@
 #include "atom/common/api/event_emitter_caller.h"
 #include "atom/common/asar/asar_util.h"
 #include "atom/common/node_bindings.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/options_switches.h"
 #include "atom/renderer/atom_render_frame_observer.h"
 #include "atom/renderer/web_worker_observer.h"
@@ -19,8 +20,6 @@
 #include "native_mate/dictionary.h"
 #include "third_party/blink/public/web/web_document.h"
 #include "third_party/blink/public/web/web_local_frame.h"
-
-#include "atom/common/node_includes.h"
 #include "third_party/electron_node/src/node_native_module.h"
 
 namespace atom {

+ 1 - 2
atom/renderer/atom_sandboxed_renderer_client.cc

@@ -10,6 +10,7 @@
 #include "atom/common/native_mate_converters/string16_converter.h"
 #include "atom/common/native_mate_converters/value_converter.h"
 #include "atom/common/node_bindings.h"
+#include "atom/common/node_includes.h"
 #include "atom/common/options_switches.h"
 #include "atom/renderer/atom_render_frame_observer.h"
 #include "base/base_paths.h"
@@ -22,8 +23,6 @@
 #include "native_mate/dictionary.h"
 #include "third_party/blink/public/web/blink.h"
 #include "third_party/blink/public/web/web_document.h"
-
-#include "atom/common/node_includes.h"
 #include "third_party/electron_node/src/node_binding.h"
 #include "third_party/electron_node/src/node_native_module.h"
 

+ 1 - 2
atom/renderer/web_worker_observer.cc

@@ -8,11 +8,10 @@
 #include "atom/common/api/event_emitter_caller.h"
 #include "atom/common/asar/asar_util.h"
 #include "atom/common/node_bindings.h"
+#include "atom/common/node_includes.h"
 #include "base/lazy_instance.h"
 #include "base/threading/thread_local.h"
 
-#include "atom/common/node_includes.h"
-
 namespace atom {
 
 namespace {