Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1249)

Unified Diff: content/browser/site_instance_impl.cc

Issue 13533007: Test extension reloading behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..29b806d10a1d34741415fc753c662dd9d57d1f69 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -56,8 +56,7 @@ SiteInstanceImpl::~SiteInstanceImpl() {
// the BrowsingInstance. Any future visits to a page from this site
// (within the same BrowsingInstance) can safely create a new SiteInstance.
if (has_site_)
- browsing_instance_->UnregisterSiteInstance(
- static_cast<SiteInstance*>(this));
+ browsing_instance_->UnregisterSiteInstance(this);
}
int32 SiteInstanceImpl::GetId() {
@@ -191,7 +190,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
}
SiteInstance* SiteInstanceImpl::GetRelatedSiteInstance(const GURL& url) {
- return browsing_instance_->GetSiteInstanceForURL(url);
+ SiteInstanceImpl* result = browsing_instance_->GetSiteInstanceForURL(url);
+ if (render_process_host_factory_)
+ result->set_render_process_host_factory(render_process_host_factory_);
+ return result;
}
bool SiteInstanceImpl::IsRelatedSiteInstance(const SiteInstance* instance) {
@@ -224,6 +226,11 @@ BrowserContext* SiteInstanceImpl::GetBrowserContext() const {
return browsing_instance_->browser_context();
}
+void SiteInstanceImpl::set_render_process_host_factory(
+ const RenderProcessHostFactory* rph_factory) {
+ render_process_host_factory_ = rph_factory;
+}
+
/*static*/
SiteInstance* SiteInstance::Create(BrowserContext* browser_context) {
return new SiteInstanceImpl(new BrowsingInstance(browser_context));

Powered by Google App Engine
This is Rietveld 408576698