Chromium Code Reviews| Index: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
| diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
| index faec87b0e7abef671f583c5cef00160f2496d713..ba5990b0b5bb92f1dd78424bffc68f25cc8fa321 100644 |
| --- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
| +++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
| @@ -430,10 +430,15 @@ void TabContentsWrapper::OnJSOutOfMemory() { |
| void TabContentsWrapper::OnRegisterProtocolHandler(const std::string& protocol, |
| const GURL& url, |
| const string16& title) { |
| + ChildProcessSecurityPolicy* policy = |
| + ChildProcessSecurityPolicy::GetInstance(); |
|
tony
2011/05/25 17:42:59
Nit: 4 space indent when wrapping
koz (OOO until 15th September)
2011/05/25 21:40:12
Done.
|
| + if (policy->IsPseudoScheme(protocol) || policy->IsDisabledScheme(protocol)) |
| + return; |
| + |
| ProtocolHandlerRegistry* registry = profile()->GetProtocolHandlerRegistry(); |
| - if (!registry->enabled()) { |
| + if (!registry->enabled()) |
| return; |
| - } |
| + |
| ProtocolHandler handler = |
| ProtocolHandler::CreateProtocolHandler(protocol, url, title); |
| if (!handler.IsEmpty() && |