Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3130)

Unified Diff: chrome/browser/ui/browser_navigator.cc

Issue 7048015: Fix app process initialization when opening an app in a new tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't use WebUI. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index bac5a9315fc94c15d8a38233b0aa7469b226e124..c109a24c2a337a2c47dcc25b32b3af6fd1eab436 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "chrome/browser/browser_url_handler.h"
+#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tabs/tab_strip_model.h"
@@ -34,8 +35,11 @@ SiteInstance* GetSiteInstance(TabContents* source_contents, Profile* profile,
// If url is a WebUI or extension, we need to be sure to use the right type
// of renderer process up front. Otherwise, we create a normal SiteInstance
// as part of creating the tab.
- if (ChromeWebUIFactory::GetInstance()->UseWebUIForURL(profile, url))
+ ExtensionService* service = profile->GetExtensionService();
+ if (ChromeWebUIFactory::GetInstance()->UseWebUIForURL(profile, url) ||
+ (service && service->GetExtensionByWebExtent(url))) {
return SiteInstance::CreateSiteInstanceForURL(profile, url);
+ }
if (!source_contents)
return NULL;
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698