diff options
author | thestig <thestig@chromium.org> | 2014-10-17 14:59:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-17 22:00:16 +0000 |
commit | ceb89f23e5b89463295bdca9d8b2babaa4e26a1e (patch) | |
tree | af2fe523deda9dfc9dcb733549da676409262c44 | |
parent | fdd5b1c0c6a4ec50137f7b5a2c6b7c02ae2149bc (diff) | |
download | chromium_src-ceb89f23e5b89463295bdca9d8b2babaa4e26a1e.zip chromium_src-ceb89f23e5b89463295bdca9d8b2babaa4e26a1e.tar.gz chromium_src-ceb89f23e5b89463295bdca9d8b2babaa4e26a1e.tar.bz2 |
Cleanup: Remove unneeded extensions #includes.
Also put some extensions #includes behind ENABLE_EXTENSIONS.
Review URL: https://codereview.chromium.org/657643003
Cr-Commit-Position: refs/heads/master@{#300168}
13 files changed, 17 insertions, 18 deletions
diff --git a/chrome/browser/bookmarks/enhanced_bookmarks_features.h b/chrome/browser/bookmarks/enhanced_bookmarks_features.h index 8b88d47..7e41837 100644 --- a/chrome/browser/bookmarks/enhanced_bookmarks_features.h +++ b/chrome/browser/bookmarks/enhanced_bookmarks_features.h @@ -7,7 +7,7 @@ #include <string> -#include "extensions/common/extension.h" +#include "build/build_config.h" namespace about_flags { class FlagsStorage; diff --git a/chrome/browser/download/download_item_model_unittest.cc b/chrome/browser/download/download_item_model_unittest.cc index 72f7000..25bdfe4 100644 --- a/chrome/browser/download/download_item_model_unittest.cc +++ b/chrome/browser/download/download_item_model_unittest.cc @@ -13,7 +13,6 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "content/public/test/mock_download_item.h" -#include "extensions/common/extension.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc index dac46c7..7c15435 100644 --- a/chrome/browser/download/download_target_determiner_unittest.cc +++ b/chrome/browser/download/download_target_determiner_unittest.cc @@ -31,7 +31,6 @@ #include "content/public/test/mock_download_item.h" #include "content/public/test/test_renderer_host.h" #include "content/public/test/web_contents_tester.h" -#include "extensions/common/extension.h" #include "net/base/mime_util.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -42,6 +41,10 @@ #include "content/public/common/webplugininfo.h" #endif +#if defined(ENABLE_EXTENSIONS) +#include "extensions/common/extension.h" +#endif + using ::testing::AnyNumber; using ::testing::Invoke; using ::testing::Ref; @@ -1147,7 +1150,7 @@ TEST_F(DownloadTargetDeterminerTest, TargetDeterminer_PromptAlways) { arraysize(kPromptingTestCases)); } -#if !defined(OS_ANDROID) +#if defined(ENABLE_EXTENSIONS) // These test cases are run with "Prompt for download" user preference set to // true. Automatic extension downloads shouldn't cause prompting. // Android doesn't support extensions. @@ -1204,7 +1207,7 @@ TEST_F(DownloadTargetDeterminerTest, TargetDeterminer_PromptAlways_Extension) { RunTestCasesWithActiveItem(kPromptingTestCases, arraysize(kPromptingTestCases)); } -#endif +#endif // defined(ENABLE_EXTENSIONS) // If the download path is managed, then we don't show any prompts. // Note that if the download path is managed, then PromptForDownload() is false. diff --git a/chrome/browser/extensions/external_component_loader.cc b/chrome/browser/extensions/external_component_loader.cc index 80fa558..02f7440 100644 --- a/chrome/browser/extensions/external_component_loader.cc +++ b/chrome/browser/extensions/external_component_loader.cc @@ -14,6 +14,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_constants.h" #include "components/signin/core/browser/signin_manager.h" +#include "extensions/common/extension.h" #include "extensions/common/extension_urls.h" namespace extensions { diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc index d6f53e4..ecf2633 100644 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc @@ -14,7 +14,6 @@ #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" #include "chrome/browser/domain_reliability/service_factory.h" #include "chrome/browser/download/download_service_factory.h" -#include "chrome/browser/extensions/extension_management.h" #include "chrome/browser/favicon/favicon_service_factory.h" #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" #include "chrome/browser/google/google_url_tracker_factory.h" @@ -57,6 +56,7 @@ #include "chrome/browser/apps/ephemeral_app_service_factory.h" #include "chrome/browser/apps/shortcut_manager_factory.h" #include "chrome/browser/extensions/browser_context_keyed_service_factories.h" +#include "chrome/browser/extensions/extension_management.h" #include "chrome/browser/search/hotword_service_factory.h" #include "chrome/browser/signin/easy_unlock_service_factory.h" #include "extensions/browser/browser_context_keyed_service_factories.h" diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc index 8ca07da..a9afbb0 100644 --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc @@ -27,7 +27,6 @@ #include "content/public/browser/cookie_store_factory.h" #include "content/public/browser/resource_context.h" #include "extensions/common/constants.h" -#include "extensions/common/extension.h" #include "net/base/sdch_dictionary_fetcher.h" #include "net/base/sdch_manager.h" #include "net/ftp/ftp_network_layer.h" @@ -39,6 +38,10 @@ #include "net/url_request/url_request_job_factory_impl.h" #include "storage/browser/database/database_tracker.h" +#if defined(ENABLE_EXTENSIONS) +#include "extensions/common/extension.h" +#endif + using content::BrowserThread; OffTheRecordProfileIOData::Handle::Handle(Profile* profile) diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc index 8c68b319..7595229 100644 --- a/chrome/browser/renderer_host/chrome_render_message_filter.cc +++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc @@ -16,13 +16,13 @@ #include "chrome/browser/net/predictor.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/common/extensions/api/i18n/default_locale_handler.h" #include "chrome/common/render_messages.h" #include "components/web_cache/browser/web_cache_manager.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_process_host.h" #if defined(ENABLE_EXTENSIONS) +#include "chrome/common/extensions/api/i18n/default_locale_handler.h" #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" #endif diff --git a/chrome/browser/sync/glue/synced_tab_delegate_android.cc b/chrome/browser/sync/glue/synced_tab_delegate_android.cc index 43140cf..68289b1 100644 --- a/chrome/browser/sync/glue/synced_tab_delegate_android.cc +++ b/chrome/browser/sync/glue/synced_tab_delegate_android.cc @@ -6,15 +6,11 @@ #include "base/memory/ref_counted.h" #include "chrome/browser/android/tab_android.h" -#include "chrome/browser/extensions/tab_helper.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sessions/session_tab_helper.h" #include "chrome/browser/sync/glue/synced_window_delegate.h" #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" -#include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/web_contents.h" -#include "extensions/common/extension.h" using content::NavigationEntry; diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc index 2c56d5e..d75121b 100644 --- a/chrome/browser/ui/bookmarks/bookmark_utils.cc +++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc @@ -9,7 +9,6 @@ #include "base/prefs/pref_service.h" #include "base/strings/string_number_conversions.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" -#include "chrome/browser/extensions/api/commands/command_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search/search.h" #include "chrome/browser/ui/app_list/app_list_util.h" @@ -31,6 +30,7 @@ #include "ui/base/l10n/l10n_util.h" #if defined(ENABLE_EXTENSIONS) +#include "chrome/browser/extensions/api/commands/command_service.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/extension_set.h" #endif diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc index 0a54dd3..73d08d5 100644 --- a/chrome/browser/ui/browser_instant_controller.cc +++ b/chrome/browser/ui/browser_instant_controller.cc @@ -19,7 +19,6 @@ #include "chrome/browser/ui/search/search_model.h" #include "chrome/browser/ui/search/search_tab_helper.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" #include "chrome/common/url_constants.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/user_metrics.h" diff --git a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc index 734f7d6..f417daf 100644 --- a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc +++ b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc @@ -11,10 +11,10 @@ #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/web_contents.h" -#include "extensions/common/extension.h" #if defined(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/tab_helper.h" +#include "extensions/common/extension.h" #endif #if defined(ENABLE_MANAGED_USERS) diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc index a415511..a583816 100644 --- a/chrome/test/base/testing_profile_manager.cc +++ b/chrome/test/base/testing_profile_manager.cc @@ -6,7 +6,6 @@ #include "base/memory/ref_counted.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/browser/extensions/extension_special_storage_policy.h" #include "chrome/browser/prefs/pref_service_syncable.h" #include "chrome/browser/profiles/profile_info_cache.h" #include "chrome/browser/profiles/profile_manager.h" @@ -18,7 +17,7 @@ #include "chrome/browser/chromeos/profiles/profile_helper.h" #endif -const std::string kGuestProfileName = "Guest"; +const char kGuestProfileName[] = "Guest"; namespace testing { diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index 9953780..e017345 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -28,7 +28,6 @@ #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/extensions/extension_action.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" |