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

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

Issue 1496483002: OOPIF: Support session restore by combining/splitting frame PageStates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix some tests Created 5 years 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_entry_impl.h
diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h
index 8d97ef39871055859583b4c36a48b7e4d78c0423..c3ccd17537be89383aa18cabe4762f5219508fb4 100644
--- a/content/browser/frame_host/navigation_entry_impl.h
+++ b/content/browser/frame_host/navigation_entry_impl.h
@@ -201,6 +201,11 @@ class CONTENT_EXPORT NavigationEntryImpl
FrameNavigationEntry* GetFrameEntryByUniqueName(
const std::string& unique_name) const;
+ // In OOPIF modes, this updates the cached copy of the full PageState whenever
+ // a frame's individual state changes. Keeping a cached copy is necessary to
+ // be able to return a const ref from GetPageState.
Avi (use Gerrit) 2015/12/02 19:17:43 I would much rather change the API. PageState isn'
Charlie Reis 2015/12/02 19:48:18 I can give it another try in a preliminary CL, tho
Charlie Reis 2015/12/02 20:44:14 Ah, I was mistaken! The last time, I tried to rem
Avi (use Gerrit) 2015/12/02 21:15:45 You're welcome. Returning a const object by value
+ void UpdatePageState();
+
void set_unique_id(int unique_id) {
unique_id_ = unique_id;
}
@@ -394,6 +399,12 @@ class CONTENT_EXPORT NavigationEntryImpl
base::Time timestamp_;
int http_status_code_;
+ // In default Chrome, this is the PageState reported from the renderer. In
+ // OOPIF modes, this is a cached copy of the PageState generated from the
+ // various FrameNavigationEntry states. In either case, it is persisted to
+ // support session/tab restore.
+ PageState page_state_;
+
// This member is not persisted with session restore because it is transient.
// If the post request succeeds, this field is cleared since the same
// information is stored in |content_state_| above. It is also only shallow

Powered by Google App Engine
This is Rietveld 408576698