Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sessions / tab_restore_service_helper.cc
index 7c1121f..8c6d777 100644 (file)
@@ -10,7 +10,6 @@
 #include "base/logging.h"
 #include "base/metrics/histogram.h"
 #include "base/stl_util.h"
-#include "chrome/browser/extensions/tab_helper.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sessions/session_types.h"
 #include "chrome/browser/sessions/tab_restore_service_delegate.h"
 #include "chrome/browser/ui/webui/ntp/core_app_launcher_handler.h"
 #endif
 
+#if defined(ENABLE_EXTENSIONS)
+#include "chrome/browser/extensions/tab_helper.h"
+#endif
+
 using content::NavigationController;
 using content::NavigationEntry;
 using content::WebContents;
@@ -421,6 +424,7 @@ void TabRestoreServiceHelper::PopulateTab(
     tab->current_navigation_index = 0;
   tab->tabstrip_index = index;
 
+#if defined(ENABLE_EXTENSIONS)
   extensions::TabHelper* extensions_tab_helper =
       extensions::TabHelper::FromWebContents(controller->GetWebContents());
   // extensions_tab_helper is NULL in some browser tests.
@@ -430,6 +434,7 @@ void TabRestoreServiceHelper::PopulateTab(
     if (extension)
       tab->extension_app_id = extension->id();
   }
+#endif
 
   tab->user_agent_override =
       controller->GetWebContents()->GetUserAgentOverride();