Index: chrome/browser/ui/webui/chrome_web_ui_factory.cc |
diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc |
index 71931fa327f22e02321d9aedf49a32bbfd5f4943..d45ddb1f9fe03b0edc83a26cb698d7198c331441 100644 |
--- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc |
+++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc |
@@ -31,8 +31,10 @@ |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/extensions/extension_constants.h" |
#include "chrome/common/url_constants.h" |
+#include "content/browser/content_browser_client.h" |
#include "content/browser/tab_contents/tab_contents.h" |
#include "content/browser/webui/web_ui.h" |
+#include "content/common/content_client.h" |
#include "googleurl/src/gurl.h" |
#if defined(OS_CHROMEOS) |
@@ -227,7 +229,10 @@ WebUI::TypeID ChromeWebUIFactory::GetWebUIType(Profile* profile, |
bool ChromeWebUIFactory::UseWebUIForURL(Profile* profile, |
const GURL& url) const { |
- return GetWebUIType(profile, url) != WebUI::kNoWebUI; |
+ // Convert installed app URLs to extension URLs to classify them properly. |
Matt Perry
2011/05/19 22:15:11
Shouldn't this be done in GetWebUIType so that we
Charlie Reis
2011/05/19 23:02:15
Ah, yes, good point. I think it actually belongs
Matt Perry
2011/05/19 23:04:43
Could you verify that we are using the same WebUI
Charlie Reis
2011/05/19 23:53:07
Wow, the WebUI code is kind of hard to follow. I
Matt Perry
2011/05/20 00:03:47
WebUI is a way of exposing extra bindings to a tab
Charlie Reis
2011/05/20 15:32:47
Thanks-- that clarifies things. I've added a chec
|
+ GURL effective_url = |
+ content::GetContentClient()->browser()->GetEffectiveURL(profile, url); |
+ return GetWebUIType(profile, effective_url) != WebUI::kNoWebUI; |
} |
bool ChromeWebUIFactory::HasWebUIScheme(const GURL& url) const { |