Index: content/browser/renderer_host/render_process_host_impl.cc |
=================================================================== |
--- content/browser/renderer_host/render_process_host_impl.cc (revision 179096) |
+++ content/browser/renderer_host/render_process_host_impl.cc (working copy) |
@@ -85,6 +85,7 @@ |
#include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
#include "content/browser/speech/speech_recognition_dispatcher_host.h" |
#include "content/browser/trace_message_filter.h" |
+#include "content/browser/webui/web_ui_controller_factory_registry.h" |
#include "content/browser/worker_host/worker_storage_partition.h" |
#include "content/browser/worker_host/worker_message_filter.h" |
#include "content/common/child_process_host_impl.h" |
@@ -99,7 +100,6 @@ |
#include "content/public/browser/render_process_host_factory.h" |
#include "content/public/browser/resource_context.h" |
#include "content/public/browser/user_metrics.h" |
-#include "content/public/browser/web_ui_controller_factory.h" |
#include "content/public/common/content_constants.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/process_type.h" |
@@ -1286,12 +1286,10 @@ |
if (!host->IsGuest() && site_url.SchemeIs(chrome::kGuestScheme)) |
return false; |
- WebUIControllerFactory* factory = |
- GetContentClient()->browser()->GetWebUIControllerFactory(); |
- if (factory && |
- ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
+ if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
host->GetID()) != |
- factory->UseWebUIBindingsForURL(browser_context, site_url)) { |
+ WebUIControllerFactoryRegistry::GetInstance()->UseWebUIBindingsForURL( |
+ browser_context, site_url)) { |
return false; |
} |
@@ -1407,10 +1405,8 @@ |
} |
// DevTools pages have WebUI type but should not reuse the same host. |
- WebUIControllerFactory* factory = |
- GetContentClient()->browser()->GetWebUIControllerFactory(); |
- if (factory && |
- factory->UseWebUIForURL(browser_context, url) && |
+ if (WebUIControllerFactoryRegistry::GetInstance()->UseWebUIForURL( |
+ browser_context, url) && |
!url.SchemeIs(chrome::kChromeDevToolsScheme)) { |
return true; |
} |