Chromium Code Reviews| Index: chrome/browser/dom_ui/dom_ui_factory.cc |
| diff --git a/chrome/browser/dom_ui/dom_ui_factory.cc b/chrome/browser/dom_ui/dom_ui_factory.cc |
| index fbdb42bea8110fec7968d6901a651d43a16c4a14..33bf86304bf5d356dca85ee573e678bc7b762f52 100644 |
| --- a/chrome/browser/dom_ui/dom_ui_factory.cc |
| +++ b/chrome/browser/dom_ui/dom_ui_factory.cc |
| @@ -234,6 +234,20 @@ bool DOMUIFactory::UseDOMUIForURL(Profile* profile, const GURL& url) { |
| } |
| // static |
| +bool DOMUIFactory::IsURLAcceptableForDOMUI(Profile* profile, const GURL& url) { |
| + return UseDOMUIForURL(profile, url) || |
| + // javacsript: URLs are allowed to run in DOM UI pages |
|
brettw
2010/11/15 00:04:32
All this stuff should be indented only 4 spaces (6
Charlie Reis
2010/11/15 17:49:27
Done.
|
| + url.SchemeIs(chrome::kJavaScriptScheme) || |
| + // It's possible to load about:blank in a DOM UI renderer. |
| + // See http://crbug.com/42547 |
| + url.spec() == chrome::kAboutBlankURL || |
| + // about:crash, about:hang, and about:shorthang are allowed. |
| + url.spec() == chrome::kAboutCrashURL || |
| + url.spec() == chrome::kAboutHangURL || |
| + url.spec() == chrome::kAboutShorthangURL; |
| +} |
| + |
| +// static |
| DOMUI* DOMUIFactory::CreateDOMUIForURL(TabContents* tab_contents, |
| const GURL& url) { |
| DOMUIFactoryFunction function = GetDOMUIFactoryFunction( |