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

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: 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
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..72ddb8cfdc57699a05bcf561851f64db1541ec66 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -47,6 +47,7 @@ class CONTENT_EXPORT FrameNavigationEntry
void UpdateEntry(const std::string& frame_unique_name,
int64_t item_sequence_number,
int64_t document_sequence_number,
+ SiteInstanceImpl* source_site_instance,
dcheng 2016/05/04 17:01:45 Random aside: it would be kind of nice if ownershi
nasko 2016/05/05 17:51:32 In this case we won't need to downcast, would we?
SiteInstanceImpl* site_instance,
Charlie Reis 2016/05/04 23:03:01 nit: Please list source_site_instance after site_i
nasko 2016/05/05 17:51:32 Done.
const GURL& url,
const Referrer& referrer,
@@ -86,6 +87,15 @@ 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.
Charlie Reis 2016/05/04 23:03:01 nit: Let's mention that it is cleared after commit
nasko 2016/05/05 17:51:32 Done.
+ void set_source_site_instance(SiteInstanceImpl* source_site_instance) {
+ source_site_instance_ = 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; }
@@ -129,6 +139,9 @@ class CONTENT_EXPORT FrameNavigationEntry
std::string method_;
int64_t post_id_;
+ // This member is cleared at commit time and not persisted.
Charlie Reis 2016/05/04 23:03:01 nit: and is not
nasko 2016/05/05 17:51:32 Done.
+ scoped_refptr<SiteInstanceImpl> source_site_instance_;
+
DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry);
};

Powered by Google App Engine
This is Rietveld 408576698