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

Unified Diff: components/sessions/core/serialized_navigation_entry.h

Issue 2310363002: Persist offline page info in a navigation entry if needed (Closed)
Patch Set: Fix Created 4 years, 3 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: components/sessions/core/serialized_navigation_entry.h
diff --git a/components/sessions/core/serialized_navigation_entry.h b/components/sessions/core/serialized_navigation_entry.h
index cc3b53d0f29df4d1cca140c959c8aa9b0c3f112e..f32b578cd1643223fea0e6eeb74ede83d0063d25 100644
--- a/components/sessions/core/serialized_navigation_entry.h
+++ b/components/sessions/core/serialized_navigation_entry.h
@@ -123,6 +123,11 @@ class SESSIONS_EXPORT SerializedNavigationEntry {
}
const std::vector<GURL>& redirect_chain() const { return redirect_chain_; }
+ // Defines the custom behavior to load the offline page if it exists. This is
+ // extracted from the extra request header "X-Chrome-offline" whose value is
+ // a comma/space separated name-value pair.
+ const std::string& offline_page_info() const { return offline_page_info_; }
sky 2016/09/13 01:53:31 Why do we want to persist this as a string rather
jianli 2016/09/13 20:29:18 We have more than one properties needed to persist
sky 2016/09/13 23:30:42 The down side of a string is that it's easy to mis
jianli 2016/09/13 23:44:16 How do we want to persist the struct? Do we still
+
private:
friend class ContentSerializedNavigationBuilder;
friend class ContentSerializedNavigationDriver;
@@ -151,6 +156,7 @@ class SESSIONS_EXPORT SerializedNavigationEntry {
int http_status_code_;
bool is_restored_; // Not persisted.
std::vector<GURL> redirect_chain_; // Not persisted.
+ std::string offline_page_info_; // Not synced.
// Additional information.
BlockedState blocked_state_;

Powered by Google App Engine
This is Rietveld 408576698