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

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

Issue 818853005: Store NavigationEntryImpl data into NavigationRequest for later usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed respective TODOs. Created 5 years, 11 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/navigation_request.h
diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h
index 502fc6d7343c9d176791a1237254322766315b50..cccfe089c476c0f8f18af4446920baeab7c9a4dd 100644
--- a/content/browser/frame_host/navigation_request.h
+++ b/content/browser/frame_host/navigation_request.h
@@ -15,8 +15,10 @@
namespace content {
class FrameTreeNode;
+class NavigationEntryImpl;
class NavigationURLLoader;
class ResourceRequestBody;
+class SiteInstanceImpl;
struct NavigationRequestInfo;
// PlzNavigate
@@ -61,6 +63,10 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate {
void BeginNavigation(scoped_ptr<NavigationRequestInfo> info,
scoped_refptr<ResourceRequestBody> body);
+ // Copies some specific data from the NavigationEntryImpl used later in the
+ // navigation process.
+ void CopyDataFrom(const NavigationEntryImpl& navitation_entry);
nasko 2015/01/16 15:03:24 The name seems a bit strange, either CopyData and
carlosk 2015/01/19 15:02:52 The method was removed in favor of an optional con
+
CommonNavigationParams& common_params() { return common_params_; }
const CommitNavigationParams& commit_params() const { return commit_params_; }
@@ -69,6 +75,20 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate {
NavigationState state() const { return state_; }
+ SiteInstanceImpl* source_site_instance() const {
+ return source_site_instance_.get();
+ }
+
+ SiteInstanceImpl* dest_site_instance() const {
+ return dest_site_instance_.get();
+ }
+
+ bool is_restore() const { return is_restore_; };
+
+ bool is_view_source() const { return is_view_source_; };
+
+ int bindings() const { return bindings_; };
+
void SetWaitingForRendererResponse() {
DCHECK(state_ == NOT_STARTED);
state_ = WAITING_FOR_RENDERER_RESPONSE;
@@ -97,6 +117,15 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate {
scoped_ptr<NavigationURLLoader> loader_;
+ // These next items are used in browser-initiated navigations to store
+ // information from the NavigationEntryImpl that is required after request
+ // creation time.
+ scoped_refptr<SiteInstanceImpl> source_site_instance_;
+ scoped_refptr<SiteInstanceImpl> dest_site_instance_;
+ bool is_restore_;
+ bool is_view_source_;
+ int bindings_;
+
DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
};
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | content/browser/frame_host/navigation_request.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698