Commit ceb89f23 authored by thestig's avatar thestig Committed by Commit bot

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}
parent fdd5b1c0
......@@ -7,7 +7,7 @@
#include <string>
#include "extensions/common/extension.h"
#include "build/build_config.h"
namespace about_flags {
class FlagsStorage;
......
......@@ -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"
......
......@@ -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.
......
......@@ -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 {
......
......@@ -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"
......
......@@ -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)
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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"
......
......@@ -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)
......
......@@ -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 {
......
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment