From f193b2b2a642b4a025fc59586c6bc6bafab7df1c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 18 May 2017 15:06:57 -0700 Subject: [PATCH] Fix build/include_what_you_use linter violations in brightray --- brightray/CPPLINT.cfg | 2 +- brightray/browser/browser_client.h | 3 +++ brightray/browser/browser_context.h | 1 + brightray/browser/devtools_file_system_indexer.cc | 2 ++ brightray/browser/devtools_manager_delegate.h | 2 ++ brightray/browser/inspectable_web_contents.h | 2 ++ brightray/browser/inspectable_web_contents_impl.h | 4 ++++ brightray/browser/inspectable_web_contents_view_delegate.h | 2 ++ brightray/browser/linux/libnotify_notification.h | 2 ++ brightray/browser/mac/cocoa_notification.h | 2 ++ brightray/browser/media/media_capture_devices_dispatcher.h | 2 ++ brightray/browser/net/devtools_network_protocol_handler.cc | 3 ++- brightray/browser/net/devtools_network_transaction.cc | 2 ++ brightray/browser/net/devtools_network_transaction_factory.cc | 3 +++ brightray/browser/notification.h | 2 ++ brightray/browser/permission_manager.h | 2 ++ brightray/browser/platform_notification_service.h | 3 +++ brightray/browser/url_request_context_getter.h | 3 +++ brightray/browser/views/views_delegate.h | 2 ++ brightray/browser/win/notification_presenter_win.cc | 3 +++ brightray/browser/win/notification_presenter_win7.cc | 3 +++ brightray/browser/win/win32_notification.cc | 4 ++++ brightray/browser/win/windows_toast_notification.h | 1 + brightray/browser/zoom_level_delegate.cc | 1 + brightray/browser/zoom_level_delegate.h | 2 ++ brightray/common/content_client.cc | 3 +-- brightray/common/content_client.h | 2 ++ brightray/common/main_delegate.h | 1 + 28 files changed, 60 insertions(+), 4 deletions(-) diff --git a/brightray/CPPLINT.cfg b/brightray/CPPLINT.cfg index 1e4a4e6de3aa..41ce31dcad96 100644 --- a/brightray/CPPLINT.cfg +++ b/brightray/CPPLINT.cfg @@ -1 +1 @@ -filter=-build/include_what_you_use,-legal/copyright,-runtime/references +filter=-legal/copyright,-runtime/references diff --git a/brightray/browser/browser_client.h b/brightray/browser/browser_client.h index 4426de839298..db6737897982 100644 --- a/brightray/browser/browser_client.h +++ b/brightray/browser/browser_client.h @@ -5,6 +5,9 @@ #ifndef BRIGHTRAY_BROWSER_BROWSER_CLIENT_H_ #define BRIGHTRAY_BROWSER_BROWSER_CLIENT_H_ +#include +#include + #include "browser/net_log.h" #include "content/public/browser/content_browser_client.h" diff --git a/brightray/browser/browser_context.h b/brightray/browser/browser_context.h index f533c73f1c42..810fc83f7a60 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 "browser/net/devtools_network_controller_handle.h" #include "browser/permission_manager.h" diff --git a/brightray/browser/devtools_file_system_indexer.cc b/brightray/browser/devtools_file_system_indexer.cc index 5217810a5779..d906f0d0bb64 100644 --- a/brightray/browser/devtools_file_system_indexer.cc +++ b/brightray/browser/devtools_file_system_indexer.cc @@ -6,7 +6,9 @@ #include +#include #include +#include #include "base/bind.h" #include "base/files/file_enumerator.h" diff --git a/brightray/browser/devtools_manager_delegate.h b/brightray/browser/devtools_manager_delegate.h index e351b06c25cc..96ff5a7e0d98 100644 --- a/brightray/browser/devtools_manager_delegate.h +++ b/brightray/browser/devtools_manager_delegate.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ #define BRIGHTRAY_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ +#include + #include "base/macros.h" #include "base/compiler_specific.h" #include "content/public/browser/devtools_manager_delegate.h" diff --git a/brightray/browser/inspectable_web_contents.h b/brightray/browser/inspectable_web_contents.h index 3b717a2b5f5a..28c00f6d72df 100644 --- a/brightray/browser/inspectable_web_contents.h +++ b/brightray/browser/inspectable_web_contents.h @@ -1,6 +1,8 @@ #ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_H_ #define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_H_ +#include + #include "content/public/browser/web_contents.h" namespace base { diff --git a/brightray/browser/inspectable_web_contents_impl.h b/brightray/browser/inspectable_web_contents_impl.h index 288f6119c44e..99bb535456d9 100644 --- a/brightray/browser/inspectable_web_contents_impl.h +++ b/brightray/browser/inspectable_web_contents_impl.h @@ -6,6 +6,10 @@ #ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_IMPL_H_ #define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_IMPL_H_ +#include +#include +#include + #include "browser/inspectable_web_contents.h" #include "browser/devtools_contents_resizing_strategy.h" diff --git a/brightray/browser/inspectable_web_contents_view_delegate.h b/brightray/browser/inspectable_web_contents_view_delegate.h index 7992c3830b14..1f30735497c4 100644 --- a/brightray/browser/inspectable_web_contents_view_delegate.h +++ b/brightray/browser/inspectable_web_contents_view_delegate.h @@ -1,6 +1,8 @@ #ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ #define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ +#include + #include "ui/gfx/image/image_skia.h" namespace brightray { diff --git a/brightray/browser/linux/libnotify_notification.h b/brightray/browser/linux/libnotify_notification.h index 41633f54b66b..ebe28739e94a 100644 --- a/brightray/browser/linux/libnotify_notification.h +++ b/brightray/browser/linux/libnotify_notification.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_ #define BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_ +#include + #include "browser/linux/libnotify_loader.h" #include "browser/notification.h" #include "ui/base/glib/glib_signal.h" diff --git a/brightray/browser/mac/cocoa_notification.h b/brightray/browser/mac/cocoa_notification.h index 96b09c5da578..7ad5c0973b1c 100644 --- a/brightray/browser/mac/cocoa_notification.h +++ b/brightray/browser/mac/cocoa_notification.h @@ -7,6 +7,8 @@ #import +#include + #include "base/mac/scoped_nsobject.h" #include "browser/notification.h" diff --git a/brightray/browser/media/media_capture_devices_dispatcher.h b/brightray/browser/media/media_capture_devices_dispatcher.h index b64596092a5c..32f3b60ff8b0 100644 --- a/brightray/browser/media/media_capture_devices_dispatcher.h +++ b/brightray/browser/media/media_capture_devices_dispatcher.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #define BRIGHTRAY_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ +#include + #include "base/memory/singleton.h" #include "content/public/browser/media_observer.h" #include "content/public/common/media_stream_request.h" diff --git a/brightray/browser/net/devtools_network_protocol_handler.cc b/brightray/browser/net/devtools_network_protocol_handler.cc index 58988577b432..b7b6670eb2ac 100644 --- a/brightray/browser/net/devtools_network_protocol_handler.cc +++ b/brightray/browser/net/devtools_network_protocol_handler.cc @@ -4,6 +4,8 @@ #include "browser/net/devtools_network_protocol_handler.h" +#include + #include "browser/browser_context.h" #include "browser/net/devtools_network_conditions.h" #include "browser/net/devtools_network_controller.h" @@ -12,7 +14,6 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/devtools_agent_host.h" - namespace brightray { namespace { diff --git a/brightray/browser/net/devtools_network_transaction.cc b/brightray/browser/net/devtools_network_transaction.cc index ced70acc5e4a..1e42a623e9e3 100644 --- a/brightray/browser/net/devtools_network_transaction.cc +++ b/brightray/browser/net/devtools_network_transaction.cc @@ -4,6 +4,8 @@ #include "browser/net/devtools_network_transaction.h" +#include + #include "browser/net/devtools_network_controller.h" #include "browser/net/devtools_network_upload_data_stream.h" #include "net/base/load_timing_info.h" diff --git a/brightray/browser/net/devtools_network_transaction_factory.cc b/brightray/browser/net/devtools_network_transaction_factory.cc index 7373c14ddeff..ffb73852a44a 100644 --- a/brightray/browser/net/devtools_network_transaction_factory.cc +++ b/brightray/browser/net/devtools_network_transaction_factory.cc @@ -4,6 +4,9 @@ #include "browser/net/devtools_network_transaction_factory.h" +#include +#include + #include "browser/net/devtools_network_controller.h" #include "browser/net/devtools_network_transaction.h" diff --git a/brightray/browser/notification.h b/brightray/browser/notification.h index 1e47d6cdac83..e59cab7a0cd4 100644 --- a/brightray/browser/notification.h +++ b/brightray/browser/notification.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_NOTIFICATION_H_ #define BRIGHTRAY_BROWSER_NOTIFICATION_H_ +#include + #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" diff --git a/brightray/browser/permission_manager.h b/brightray/browser/permission_manager.h index a63041fedc26..da39fdd91bde 100644 --- a/brightray/browser/permission_manager.h +++ b/brightray/browser/permission_manager.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_PERMISSION_MANAGER_H_ #define BRIGHTRAY_BROWSER_PERMISSION_MANAGER_H_ +#include + #include "base/callback_forward.h" #include "base/macros.h" #include "content/public/browser/permission_manager.h" diff --git a/brightray/browser/platform_notification_service.h b/brightray/browser/platform_notification_service.h index 30a631cc5e84..298bb3eeff7e 100644 --- a/brightray/browser/platform_notification_service.h +++ b/brightray/browser/platform_notification_service.h @@ -5,6 +5,9 @@ #ifndef BRIGHTRAY_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ #define BRIGHTRAY_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ +#include +#include + #include "content/public/browser/browser_context.h" #include "content/public/browser/platform_notification_service.h" diff --git a/brightray/browser/url_request_context_getter.h b/brightray/browser/url_request_context_getter.h index f534c1a75728..d1fa00c48582 100644 --- a/brightray/browser/url_request_context_getter.h +++ b/brightray/browser/url_request_context_getter.h @@ -5,6 +5,9 @@ #ifndef BRIGHTRAY_BROWSER_URL_REQUEST_CONTEXT_GETTER_H_ #define BRIGHTRAY_BROWSER_URL_REQUEST_CONTEXT_GETTER_H_ +#include +#include + #include "base/files/file_path.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/content_browser_client.h" diff --git a/brightray/browser/views/views_delegate.h b/brightray/browser/views/views_delegate.h index d63eeb533d67..a764f8c16e3d 100644 --- a/brightray/browser/views/views_delegate.h +++ b/brightray/browser/views/views_delegate.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_VIEWS_VIEWS_DELEGATE_H_ #define BRIGHTRAY_BROWSER_VIEWS_VIEWS_DELEGATE_H_ +#include + #include "base/compiler_specific.h" #include "ui/views/views_delegate.h" diff --git a/brightray/browser/win/notification_presenter_win.cc b/brightray/browser/win/notification_presenter_win.cc index 930775c792b2..acb4b22932c0 100644 --- a/brightray/browser/win/notification_presenter_win.cc +++ b/brightray/browser/win/notification_presenter_win.cc @@ -6,6 +6,9 @@ #include "browser/win/notification_presenter_win.h" +#include +#include + #include "base/files/file_util.h" #include "base/md5.h" #include "base/strings/utf_string_conversions.h" diff --git a/brightray/browser/win/notification_presenter_win7.cc b/brightray/browser/win/notification_presenter_win7.cc index f002c476d5a9..05286946e3e2 100644 --- a/brightray/browser/win/notification_presenter_win7.cc +++ b/brightray/browser/win/notification_presenter_win7.cc @@ -1,4 +1,7 @@ #include "browser/win/notification_presenter_win7.h" + +#include + #include "browser/win/win32_notification.h" namespace brightray { diff --git a/brightray/browser/win/win32_notification.cc b/brightray/browser/win/win32_notification.cc index 5b6093658aac..8c80c9d37a90 100644 --- a/brightray/browser/win/win32_notification.cc +++ b/brightray/browser/win/win32_notification.cc @@ -1,6 +1,10 @@ #define WIN32_LEAN_AND_MEAN + #include "browser/win/win32_notification.h" + #include +#include + #include "third_party/skia/include/core/SkBitmap.h" namespace brightray { diff --git a/brightray/browser/win/windows_toast_notification.h b/brightray/browser/win/windows_toast_notification.h index 47c7d596a88b..3b32170183ba 100644 --- a/brightray/browser/win/windows_toast_notification.h +++ b/brightray/browser/win/windows_toast_notification.h @@ -12,6 +12,7 @@ #include #include #include +#include #include "browser/notification.h" diff --git a/brightray/browser/zoom_level_delegate.cc b/brightray/browser/zoom_level_delegate.cc index 7148b18e18a4..0b8f373970bb 100644 --- a/brightray/browser/zoom_level_delegate.cc +++ b/brightray/browser/zoom_level_delegate.cc @@ -5,6 +5,7 @@ #include "browser/zoom_level_delegate.h" #include +#include #include "base/bind.h" #include "base/strings/string_number_conversions.h" diff --git a/brightray/browser/zoom_level_delegate.h b/brightray/browser/zoom_level_delegate.h index aed065d7ec66..d3a9424a3452 100644 --- a/brightray/browser/zoom_level_delegate.h +++ b/brightray/browser/zoom_level_delegate.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_BROWSER_ZOOM_LEVEL_DELEGATE_H_ #define BRIGHTRAY_BROWSER_ZOOM_LEVEL_DELEGATE_H_ +#include + #include "base/files/file_path.h" #include "base/macros.h" #include "components/prefs/pref_service.h" diff --git a/brightray/common/content_client.cc b/brightray/common/content_client.cc index ebe066be613d..a9f7e414c152 100644 --- a/brightray/common/content_client.cc +++ b/brightray/common/content_client.cc @@ -4,10 +4,9 @@ #include "common/content_client.h" -#include "common/application_info.h" - #include "base/strings/stringprintf.h" #include "base/strings/string_util.h" +#include "common/application_info.h" #include "content/public/common/user_agent.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" diff --git a/brightray/common/content_client.h b/brightray/common/content_client.h index 09df6539692f..44fddd8b45a5 100644 --- a/brightray/common/content_client.h +++ b/brightray/common/content_client.h @@ -5,6 +5,8 @@ #ifndef BRIGHTRAY_COMMON_CONTENT_CLIENT_H_ #define BRIGHTRAY_COMMON_CONTENT_CLIENT_H_ +#include + #include "base/compiler_specific.h" #include "content/public/common/content_client.h" diff --git a/brightray/common/main_delegate.h b/brightray/common/main_delegate.h index 515e8a821db1..4139a20521b0 100644 --- a/brightray/common/main_delegate.h +++ b/brightray/common/main_delegate.h @@ -6,6 +6,7 @@ #define BRIGHTRAY_COMMON_MAIN_DELEGATE_H_ #include +#include #include "base/macros.h" #include "content/public/app/content_main_delegate.h"