From 62109d9af7c8db2c1bcaef715f04ca92b4d59746 Mon Sep 17 00:00:00 2001 From: creis Date: Wed, 27 May 2015 18:28:39 -0700 Subject: Fix the commit type for out-of-process iframes. Passes a has_committed_real_load param to the renderer to let the (possibly new) FrameLoader know if there have been commits in that frame in the past, perhaps in another process. Also fixes broken invariants in NavigationController and tests. Only affects --site-per-process mode. BUG=464014 TEST=Navigation tests still pass. Review URL: https://codereview.chromium.org/1148953014 Cr-Commit-Position: refs/heads/master@{#331712} --- content/browser/frame_host/navigation_entry_impl.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'content/browser/frame_host/navigation_entry_impl.h') diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h index d5f43ea..8fb41c3 100644 --- a/content/browser/frame_host/navigation_entry_impl.h +++ b/content/browser/frame_host/navigation_entry_impl.h @@ -34,6 +34,9 @@ class CONTENT_EXPORT NavigationEntryImpl TreeNode(FrameNavigationEntry* frame_entry); ~TreeNode(); + // Returns whether this TreeNode corresponds to |frame_tree_node|. + bool MatchesFrame(FrameTreeNode* frame_tree_node) const; + // Returns a deep copy of the tree with copies of each node's // FrameNavigationEntries. We do not yet share FrameNavigationEntries // across trees. @@ -134,6 +137,7 @@ class CONTENT_EXPORT NavigationEntryImpl StartNavigationParams ConstructStartNavigationParams() const; RequestNavigationParams ConstructRequestNavigationParams( base::TimeTicks navigation_start, + bool has_committed_real_load, bool intended_as_new_entry, int pending_offset_to_send, int current_offset_to_send, @@ -156,11 +160,17 @@ class CONTENT_EXPORT NavigationEntryImpl // its FrameNavigationEntry. A new FrameNavigationEntry is added if none // exists, or else the existing one (which might be shared with other // NavigationEntries) is updated with the given parameters. + // Does nothing if there is no entry already and |url| is about:blank, since + // that does not count as a real commit. void AddOrUpdateFrameEntry(FrameTreeNode* frame_tree_node, SiteInstanceImpl* site_instance, const GURL& url, const Referrer& referrer); + // Returns whether this entry has a FrameNavigationEntry for the given + // |frame_tree_node|. + bool HasFrameEntry(FrameTreeNode* frame_tree_node) const; + void set_unique_id(int unique_id) { unique_id_ = unique_id; } @@ -307,6 +317,10 @@ class CONTENT_EXPORT NavigationEntryImpl #endif private: + // Finds the TreeNode associated with |frame_tree_node|, if any. + NavigationEntryImpl::TreeNode* FindFrameEntry( + FrameTreeNode* frame_tree_node) const; + // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING // Session/Tab restore save portions of this class so that it can be recreated // later. If you add a new field that needs to be persisted you'll have to -- cgit v1.1