| Index: chrome/browser/tab_contents/tab_util.cc
|
| diff --git a/chrome/browser/tab_contents/tab_util.cc b/chrome/browser/tab_contents/tab_util.cc
|
| index c6c0849bc89134177953a5701d1fb93b1ff23db9..219a1a4cce8456664af32fc15ef247f45c4c93ae 100644
|
| --- a/chrome/browser/tab_contents/tab_util.cc
|
| +++ b/chrome/browser/tab_contents/tab_util.cc
|
| @@ -10,9 +10,12 @@
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/site_instance.h"
|
| #include "content/public/browser/web_contents.h"
|
| -#include "extensions/browser/extension_registry.h"
|
| #include "url/gurl.h"
|
|
|
| +#if defined(ENABLE_EXTENSIONS)
|
| +#include "extensions/browser/extension_registry.h"
|
| +#endif
|
| +
|
| using content::RenderViewHost;
|
| using content::SiteInstance;
|
| using content::WebContents;
|
| @@ -32,12 +35,14 @@ SiteInstance* GetSiteInstanceForNewTab(Profile* profile,
|
| const GURL& url) {
|
| // If |url| is a WebUI or extension, we set the SiteInstance up front so that
|
| // we don't end up with an extra process swap on the first navigation.
|
| - if (ChromeWebUIControllerFactory::GetInstance()->UseWebUIForURL(
|
| - profile, url) ||
|
| - extensions::ExtensionRegistry::Get(
|
| - profile)->enabled_extensions().GetHostedAppByURL(url)) {
|
| + if (ChromeWebUIControllerFactory::GetInstance()->UseWebUIForURL(profile, url))
|
| return SiteInstance::CreateForURL(profile, url);
|
| - }
|
| +
|
| +#if defined(ENABLE_EXTENSIONS)
|
| + if (extensions::ExtensionRegistry::Get(
|
| + profile)->enabled_extensions().GetHostedAppByURL(url))
|
| + return SiteInstance::CreateForURL(profile, url);
|
| +#endif
|
|
|
| // We used to share the SiteInstance for same-site links opened in new tabs,
|
| // to leverage the in-memory cache and reduce process creation. It now
|
|
|