Index: chrome/browser/ui/browser_navigator.cc |
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc |
index b0961df5d6a65bb2557bdf1a4b4afba565d4d5c8..6b7c43a530fbfc13fb5a36f61e2edbf6a1beacf8 100644 |
--- a/chrome/browser/ui/browser_navigator.cc |
+++ b/chrome/browser/ui/browser_navigator.cc |
@@ -39,17 +39,21 @@ |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
-#include "extensions/browser/extension_registry.h" |
-#include "extensions/common/extension.h" |
-#include "extensions/common/extension_set.h" |
#if defined(USE_ASH) |
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
#endif |
+ |
#if defined(USE_AURA) |
#include "ui/aura/window.h" |
#endif |
+#if defined(ENABLE_EXTENSIONS) |
+#include "extensions/browser/extension_registry.h" |
+#include "extensions/common/extension.h" |
+#include "extensions/common/extension_set.h" |
+#endif |
+ |
using content::GlobalRequestID; |
using content::NavigationController; |
using content::WebContents; |
@@ -493,12 +497,14 @@ void Navigate(NavigateParams* params) { |
if (!AdjustNavigateParamsForURL(params)) |
return; |
+#if defined(ENABLE_EXTENSIONS) |
const extensions::Extension* extension = |
extensions::ExtensionRegistry::Get(params->initiating_profile)-> |
enabled_extensions().GetExtensionOrAppByURL(params->url); |
// Platform apps cannot navigate. Block the request. |
if (extension && extension->is_platform_app()) |
params->url = GURL(chrome::kExtensionInvalidRequestURL); |
+#endif |
// The browser window may want to adjust the disposition. |
if (params->disposition == NEW_POPUP && |