Index: content/test/test_render_view_host_factory.cc |
diff --git a/content/test/test_render_view_host_factory.cc b/content/test/test_render_view_host_factory.cc |
index 3211dd021e7f7041a9e334b00cfddfac0cad8155..47213aa170c783f7df33eed6d5b27bc4643938f1 100644 |
--- a/content/test/test_render_view_host_factory.cc |
+++ b/content/test/test_render_view_host_factory.cc |
@@ -11,18 +11,19 @@ |
namespace content { |
TestRenderViewHostFactory::TestRenderViewHostFactory( |
- RenderProcessHostFactory* rph_factory) |
- : render_process_host_factory_(rph_factory) { |
+ RenderProcessHostFactory* rph_factory) { |
+ SiteInstanceImpl::set_render_process_host_factory(rph_factory); |
RenderViewHostFactory::RegisterFactory(this); |
} |
TestRenderViewHostFactory::~TestRenderViewHostFactory() { |
RenderViewHostFactory::UnregisterFactory(); |
+ SiteInstanceImpl::set_render_process_host_factory(NULL); |
} |
void TestRenderViewHostFactory::set_render_process_host_factory( |
RenderProcessHostFactory* rph_factory) { |
- render_process_host_factory_ = rph_factory; |
+ SiteInstanceImpl::set_render_process_host_factory(rph_factory); |
} |
RenderViewHost* TestRenderViewHostFactory::CreateRenderViewHost( |
@@ -33,9 +34,6 @@ RenderViewHost* TestRenderViewHostFactory::CreateRenderViewHost( |
int main_frame_routing_id, |
bool swapped_out, |
SessionStorageNamespace* session_storage) { |
- // See declaration of render_process_host_factory_ below. |
- static_cast<SiteInstanceImpl*>(instance)-> |
- set_render_process_host_factory(render_process_host_factory_); |
return new TestRenderViewHost( |
instance, delegate, widget_delegate, routing_id, main_frame_routing_id, |
swapped_out); |