Index: content/browser/site_instance_impl.cc |
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc |
index 3a93f25c9fa5de8db5c3b77772fed47daedd22bd..802efef6586669fb6c9b7306e1f26d877bde68cb 100644 |
--- a/content/browser/site_instance_impl.cc |
+++ b/content/browser/site_instance_impl.cc |
@@ -191,7 +191,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) { |
} |
SiteInstance* SiteInstanceImpl::GetRelatedSiteInstance(const GURL& url) { |
- return browsing_instance_->GetSiteInstanceForURL(url); |
+ SiteInstance* result = browsing_instance_->GetSiteInstanceForURL(url); |
+ if (render_process_host_factory_) |
+ result->SetRenderProcessHostFactoryForTesting(render_process_host_factory_); |
Jeffrey Yasskin
2013/04/08 16:30:48
I got a "calling functions intended only for testi
jam
2013/04/08 16:54:53
ah, since there's a call path in a non-test file,
Paweł Hajdan Jr.
2013/04/08 20:03:51
By the way, calling Set, a mutating method in a me
Jeffrey Yasskin
2013/04/08 22:09:38
What? The Set() is on the newly-constructed result
Jeffrey Yasskin
2013/04/08 22:09:38
Well, I could put back the changes to browsing_ins
Paweł Hajdan Jr.
2013/04/08 22:17:38
Oops, this makes more sense. Please ignore my earl
Jeffrey Yasskin
2013/04/08 22:38:02
Done, although I can switch to directly modifying
|
+ return result; |
} |
bool SiteInstanceImpl::IsRelatedSiteInstance(const SiteInstance* instance) { |
@@ -224,6 +227,11 @@ BrowserContext* SiteInstanceImpl::GetBrowserContext() const { |
return browsing_instance_->browser_context(); |
} |
+void SiteInstanceImpl::SetRenderProcessHostFactoryForTesting( |
+ const RenderProcessHostFactory* rph_factory) { |
+ render_process_host_factory_ = rph_factory; |
+} |
+ |
/*static*/ |
SiteInstance* SiteInstance::Create(BrowserContext* browser_context) { |
return new SiteInstanceImpl(new BrowsingInstance(browser_context)); |