| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 5 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "content/browser/frame_host/debug_urls.h" | 8 #include "content/browser/frame_host/debug_urls.h" |
| 9 #include "content/public/common/url_constants.h" | 9 #include "content/public/common/url_constants.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool WebUIControllerFactoryRegistry::IsURLAcceptableForWebUI( | 80 bool WebUIControllerFactoryRegistry::IsURLAcceptableForWebUI( |
| 81 BrowserContext* browser_context, | 81 BrowserContext* browser_context, |
| 82 const GURL& url) const { | 82 const GURL& url) const { |
| 83 return UseWebUIForURL(browser_context, url) || | 83 return UseWebUIForURL(browser_context, url) || |
| 84 // It's possible to load about:blank in a Web UI renderer. | 84 // It's possible to load about:blank in a Web UI renderer. |
| 85 // See http://crbug.com/42547 | 85 // See http://crbug.com/42547 |
| 86 url.spec() == kAboutBlankURL || | 86 url.spec() == url::kAboutBlankURL || |
| 87 // javascript: and debug URLs like chrome://kill are allowed. | 87 // javascript: and debug URLs like chrome://kill are allowed. |
| 88 IsRendererDebugURL(url); | 88 IsRendererDebugURL(url); |
| 89 } | 89 } |
| 90 | 90 |
| 91 WebUIControllerFactoryRegistry::WebUIControllerFactoryRegistry() { | 91 WebUIControllerFactoryRegistry::WebUIControllerFactoryRegistry() { |
| 92 } | 92 } |
| 93 | 93 |
| 94 WebUIControllerFactoryRegistry::~WebUIControllerFactoryRegistry() { | 94 WebUIControllerFactoryRegistry::~WebUIControllerFactoryRegistry() { |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace content | 97 } // namespace content |
| OLD | NEW |