diff options
author | thestig <thestig@chromium.org> | 2014-09-18 15:57:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-18 22:57:28 +0000 |
commit | b012bc3d7d404903fb75f3bbee11d95de0ad961b (patch) | |
tree | 765e8a0008555da5bbc7cd3f253d297da5a44c57 | |
parent | 3e8588fa8fd144eb68acd3965f3dedbfcf9e7673 (diff) | |
download | chromium_src-b012bc3d7d404903fb75f3bbee11d95de0ad961b.zip chromium_src-b012bc3d7d404903fb75f3bbee11d95de0ad961b.tar.gz chromium_src-b012bc3d7d404903fb75f3bbee11d95de0ad961b.tar.bz2 |
Cleanup: Remove unneeded extension_messages.h usage and ifdef out some extensions code usage when extensions are disabled.
Review URL: https://codereview.chromium.org/559523004
Cr-Commit-Position: refs/heads/master@{#295587}
17 files changed, 28 insertions, 15 deletions
diff --git a/apps/launcher.cc b/apps/launcher.cc index 9272a66..a4272a6 100644 --- a/apps/launcher.cc +++ b/apps/launcher.cc @@ -33,7 +33,6 @@ #include "extensions/browser/process_manager.h" #include "extensions/common/api/app_runtime.h" #include "extensions/common/extension.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_handlers/kiosk_mode_info.h" #include "net/base/filename_util.h" #include "net/base/net_util.h" diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 774aab5..4e01737 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -30,7 +30,6 @@ #include "components/nacl/common/nacl_switches.h" #include "components/search/search_switches.h" #include "content/public/browser/user_metrics.h" -#include "extensions/common/switches.h" #include "media/base/media_switches.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/ui_base_switches.h" @@ -63,6 +62,10 @@ #include "ui/app_list/app_list_switches.h" #endif +#if defined(ENABLE_EXTENSIONS) +#include "extensions/common/switches.h" +#endif + using base::UserMetricsAction; namespace about_flags { @@ -658,6 +661,7 @@ const Experiment kExperiments[] = { MULTI_VALUE_TYPE(kNaClDebugMaskChoices) }, #endif +#if defined(ENABLE_EXTENSIONS) { "extension-apis", // FLAGS:RECORD_UMA IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, @@ -672,6 +676,7 @@ const Experiment kExperiments[] = { kOsAll, SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs) }, +#endif { "enable-fast-unload", IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME, @@ -679,6 +684,7 @@ const Experiment kExperiments[] = { kOsAll, SINGLE_VALUE_TYPE(switches::kEnableFastUnload) }, +#if defined(ENABLE_EXTENSIONS) { "enable-app-window-controls", IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME, @@ -686,6 +692,7 @@ const Experiment kExperiments[] = { kOsDesktop, SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls) }, +#endif { "disable-hyperlink-auditing", IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME, @@ -1468,6 +1475,7 @@ const Experiment kExperiments[] = { SINGLE_VALUE_TYPE(switches::kEnableAppList) }, #endif +#if defined(ENABLE_EXTENSIONS) { "enable-app-view", IDS_FLAGS_ENABLE_APP_VIEW_NAME, @@ -1475,6 +1483,7 @@ const Experiment kExperiments[] = { kOsDesktop, SINGLE_VALUE_TYPE(extensions::switches::kEnableAppView) }, +#endif { "disable-app-list-app-info", IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST, @@ -1588,6 +1597,7 @@ const Experiment kExperiments[] = { SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting) }, #endif +#if defined(ENABLE_EXTENSIONS) { "enable-apps-show-on-first-paint", IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME, @@ -1595,6 +1605,7 @@ const Experiment kExperiments[] = { kOsDesktop, SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint) }, +#endif { "enhanced-bookmarks-experiment", IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, @@ -1811,6 +1822,7 @@ const Experiment kExperiments[] = { switches::kDisableTextInputFocusManager) }, #endif +#if defined(ENABLE_EXTENSIONS) { "extension-active-script-permission", IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME, @@ -1818,6 +1830,7 @@ const Experiment kExperiments[] = { kOsAll, SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction) }, +#endif { "harfbuzz-rendertext", IDS_FLAGS_HARFBUZZ_RENDERTEXT_NAME, @@ -1853,6 +1866,7 @@ const Experiment kExperiments[] = { kOsDesktop, SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwording) }, +#if defined(ENABLE_EXTENSIONS) { "enable-embedded-extension-options", IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, @@ -1860,6 +1874,7 @@ const Experiment kExperiments[] = { kOsDesktop, SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) }, +#endif { "enable-website-settings-manager", IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME, @@ -1881,6 +1896,7 @@ const Experiment kExperiments[] = { kOsAll, MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) }, +#if defined(ENABLE_EXTENSIONS) { "enable-extension-action-redesign", IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME, @@ -1888,6 +1904,7 @@ const Experiment kExperiments[] = { kOsWin | kOsLinux | kOsCrOS, SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign) }, +#endif { "autofill-sync-credential", IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, diff --git a/chrome/browser/apps/app_url_redirector.cc b/chrome/browser/apps/app_url_redirector.cc index 968ba27..623a7d0 100644 --- a/chrome/browser/apps/app_url_redirector.cc +++ b/chrome/browser/apps/app_url_redirector.cc @@ -20,7 +20,6 @@ #include "content/public/browser/web_contents.h" #include "extensions/browser/info_map.h" #include "extensions/common/extension.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "net/url_request/url_request.h" diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc index 1de7c59..b648089 100644 --- a/chrome/browser/extensions/api/messaging/message_service.cc +++ b/chrome/browser/extensions/api/messaging/message_service.cc @@ -35,7 +35,6 @@ #include "extensions/browser/lazy_background_task_queue.h" #include "extensions/browser/process_manager.h" #include "extensions/common/extension.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/externally_connectable.h" diff --git a/chrome/browser/sessions/session_tab_helper.cc b/chrome/browser/sessions/session_tab_helper.cc index c4c0e4e..467ed22 100644 --- a/chrome/browser/sessions/session_tab_helper.cc +++ b/chrome/browser/sessions/session_tab_helper.cc @@ -11,7 +11,10 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" + +#if defined(ENABLE_EXTENSIONS) #include "extensions/common/extension_messages.h" +#endif DEFINE_WEB_CONTENTS_USER_DATA_KEY(SessionTabHelper); @@ -25,11 +28,13 @@ SessionTabHelper::~SessionTabHelper() { void SessionTabHelper::SetWindowID(const SessionID& id) { window_id_ = id; +#if defined(ENABLE_EXTENSIONS) // Extension code in the renderer holds the ID of the window that hosts it. // Notify it that the window ID changed. web_contents()->GetRenderViewHost()->Send( new ExtensionMsg_UpdateBrowserWindowId( web_contents()->GetRenderViewHost()->GetRoutingID(), id.id())); +#endif } // static @@ -47,12 +52,14 @@ SessionID::id_type SessionTabHelper::IdForWindowContainingTab( return session_tab_helper ? session_tab_helper->window_id().id() : -1; } +#if defined(ENABLE_EXTENSIONS) void SessionTabHelper::RenderViewCreated( content::RenderViewHost* render_view_host) { render_view_host->Send( new ExtensionMsg_UpdateBrowserWindowId(render_view_host->GetRoutingID(), window_id_.id())); } +#endif void SessionTabHelper::UserAgentOverrideSet(const std::string& user_agent) { #if defined(ENABLE_SESSION_SERVICE) diff --git a/chrome/browser/sessions/session_tab_helper.h b/chrome/browser/sessions/session_tab_helper.h index d47ec80..7fb44eb 100644 --- a/chrome/browser/sessions/session_tab_helper.h +++ b/chrome/browser/sessions/session_tab_helper.h @@ -43,8 +43,10 @@ class SessionTabHelper : public content::WebContentsObserver, const content::WebContents* tab); // content::WebContentsObserver: +#if defined(ENABLE_EXTENSIONS) virtual void RenderViewCreated( content::RenderViewHost* render_view_host) OVERRIDE; +#endif virtual void UserAgentOverrideSet(const std::string& user_agent) OVERRIDE; private: diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index c671452..2130027 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc @@ -19,7 +19,6 @@ #include "content/public/test/test_browser_thread.h" #include "extensions/browser/extension_prefs.h" #include "extensions/common/extension.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/permissions/api_permission_set.h" #include "extensions/common/permissions/permission_set.h" diff --git a/chrome/browser/ui/webui/sync_internals_ui.cc b/chrome/browser/ui/webui/sync_internals_ui.cc index e7ec282..4d6b673 100644 --- a/chrome/browser/ui/webui/sync_internals_ui.cc +++ b/chrome/browser/ui/webui/sync_internals_ui.cc @@ -9,7 +9,6 @@ #include "chrome/common/url_constants.h" #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_data_source.h" -#include "extensions/common/extension_messages.h" #include "grit/sync_internals_resources.h" namespace { diff --git a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc index e9a0bc2..6f5a4bb 100644 --- a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc +++ b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc @@ -10,7 +10,6 @@ #include "base/values.h" #include "chrome/grit/generated_resources.h" #include "extensions/common/error_utils.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/feature_switch.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/permissions/manifest_permission.h" diff --git a/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc b/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc index 4fbb6088..6529f9d 100644 --- a/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc +++ b/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc @@ -12,7 +12,6 @@ #include "extensions/common/constants.h" #include "extensions/common/extension.h" #include "extensions/common/extension_builder.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/permissions_data.h" #include "extensions/renderer/dispatcher.h" #include "extensions/renderer/test_extensions_renderer_client.h" diff --git a/extensions/browser/lazy_background_task_queue.cc b/extensions/browser/lazy_background_task_queue.cc index 44a527f..5ac92de 100644 --- a/extensions/browser/lazy_background_task_queue.cc +++ b/extensions/browser/lazy_background_task_queue.cc @@ -19,7 +19,6 @@ #include "extensions/browser/process_manager.h" #include "extensions/browser/process_map.h" #include "extensions/common/extension.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/view_type.h" diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc b/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc index e441e55..0397c41 100644 --- a/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc +++ b/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc @@ -12,7 +12,6 @@ #include "extensions/common/api/bluetooth/bluetooth_manifest_data.h" #include "extensions/common/api/extensions_manifest_types.h" #include "extensions/common/error_utils.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "grit/extensions_strings.h" #include "ipc/ipc_message.h" diff --git a/extensions/common/api/sockets/sockets_manifest_permission.cc b/extensions/common/api/sockets/sockets_manifest_permission.cc index 455d1dad..f695494 100644 --- a/extensions/common/api/sockets/sockets_manifest_permission.cc +++ b/extensions/common/api/sockets/sockets_manifest_permission.cc @@ -11,7 +11,6 @@ #include "extensions/common/api/extensions_manifest_types.h" #include "extensions/common/api/sockets/sockets_manifest_data.h" #include "extensions/common/error_utils.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "grit/extensions_strings.h" #include "ipc/ipc_message.h" diff --git a/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc b/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc index e933235..6c96fb2 100644 --- a/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc +++ b/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc @@ -8,7 +8,6 @@ #include "base/pickle.h" #include "base/values.h" #include "extensions/common/api/sockets/sockets_manifest_permission.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "ipc/ipc_message.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/extensions/common/permissions/manifest_permission_set_unittest.cc b/extensions/common/permissions/manifest_permission_set_unittest.cc index fdfec16..ddac081 100644 --- a/extensions/common/permissions/manifest_permission_set_unittest.cc +++ b/extensions/common/permissions/manifest_permission_set_unittest.cc @@ -4,7 +4,6 @@ #include "base/pickle.h" #include "base/values.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/manifest_permission.h" #include "extensions/common/permissions/manifest_permission_set.h" #include "ipc/ipc_message.h" diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc index 5938556..2188341 100644 --- a/extensions/renderer/module_system.cc +++ b/extensions/renderer/module_system.cc @@ -11,7 +11,7 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "content/public/renderer/render_view.h" -#include "extensions/common/extension_messages.h" +#include "extensions/common/extension.h" #include "extensions/common/extensions_client.h" #include "extensions/renderer/console.h" #include "extensions/renderer/safe_builtins.h" diff --git a/extensions/renderer/user_script_set.cc b/extensions/renderer/user_script_set.cc index c14abd1..92608bd 100644 --- a/extensions/renderer/user_script_set.cc +++ b/extensions/renderer/user_script_set.cc @@ -7,7 +7,6 @@ #include "content/public/common/url_constants.h" #include "content/public/renderer/render_thread.h" #include "extensions/common/extension.h" -#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "extensions/common/permissions/permissions_data.h" #include "extensions/renderer/extensions_renderer_client.h" |