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

Unified Diff: content/browser/frame_host/frame_navigation_entry.h

Issue 1944013003: Move ownership of source SiteInstance to the FrameNavigationEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another round of review comments addressed. Created 4 years, 7 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
« no previous file with comments | « no previous file | content/browser/frame_host/frame_navigation_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_navigation_entry.h
diff --git a/content/browser/frame_host/frame_navigation_entry.h b/content/browser/frame_host/frame_navigation_entry.h
index 256cd266a0f2dab43833c27c717c28ea0689d68b..5470c484fbb086c9a7608d98bff4bc06c741d35c 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -34,6 +34,7 @@ class CONTENT_EXPORT FrameNavigationEntry
int64_t item_sequence_number,
int64_t document_sequence_number,
scoped_refptr<SiteInstanceImpl> site_instance,
+ scoped_refptr<SiteInstanceImpl> source_site_instance,
const GURL& url,
const Referrer& referrer,
const std::string& method,
@@ -48,6 +49,7 @@ class CONTENT_EXPORT FrameNavigationEntry
int64_t item_sequence_number,
int64_t document_sequence_number,
SiteInstanceImpl* site_instance,
+ scoped_refptr<SiteInstanceImpl> source_site_instance,
const GURL& url,
const Referrer& referrer,
const PageState& page_state,
@@ -86,6 +88,18 @@ class CONTENT_EXPORT FrameNavigationEntry
}
SiteInstanceImpl* site_instance() const { return site_instance_.get(); }
+ // The |source_site_instance| is used to identify the SiteInstance of the
+ // frame that initiated the navigation. It is present only for
+ // renderer-initiated navigations and is cleared once the navigation has
+ // committed.
+ void set_source_site_instance(
+ scoped_refptr<SiteInstanceImpl> source_site_instance) {
+ source_site_instance_ = std::move(source_site_instance);
+ }
+ SiteInstanceImpl* source_site_instance() const {
+ return source_site_instance_.get();
+ }
+
// The actual URL loaded in the frame. This is in contrast to the virtual
// URL, which is shown to the user.
void set_url(const GURL& url) { url_ = url; }
@@ -122,6 +136,8 @@ class CONTENT_EXPORT FrameNavigationEntry
int64_t item_sequence_number_;
int64_t document_sequence_number_;
scoped_refptr<SiteInstanceImpl> site_instance_;
+ // This member is cleared at commit time and is not persisted.
+ scoped_refptr<SiteInstanceImpl> source_site_instance_;
GURL url_;
Referrer referrer_;
// TODO(creis): Change this to FrameState.
« no previous file with comments | « no previous file | content/browser/frame_host/frame_navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698