summaryrefslogtreecommitdiffstats
path: root/content/common/page_state_serialization.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/common/page_state_serialization.cc')
-rw-r--r--content/common/page_state_serialization.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 1a7db619..9e57150 100644
--- a/content/common/page_state_serialization.cc
+++ b/content/common/page_state_serialization.cc
@@ -188,12 +188,13 @@ struct SerializeObject {
// 15: Removes a bunch of values we defined but never used.
// 16: Switched from blob urls to blob uuids.
// 17: Add a target frame id number.
+// 18: Add referrer policy.
//
// NOTE: If the version is -1, then the pickle contains only a URL string.
// See ReadPageState.
//
const int kMinVersion = 11;
-const int kCurrentVersion = 17;
+const int kCurrentVersion = 18;
// A bunch of convenience functions to read/write to SerializeObjects. The
// de-serializers assume the input data will be in the correct format and fall
@@ -504,6 +505,7 @@ void WriteFrameState(
WriteInteger64(state.item_sequence_number, obj);
WriteInteger64(state.document_sequence_number, obj);
WriteInteger64(state.target_frame_id, obj);
+ WriteInteger(state.referrer_policy, obj);
bool has_state_object = !state.state_object.is_null();
WriteBoolean(has_state_object, obj);
@@ -556,6 +558,10 @@ void ReadFrameState(SerializeObject* obj, bool is_top,
state->document_sequence_number = ReadInteger64(obj);
if (obj->version >= 17)
state->target_frame_id = ReadInteger64(obj);
+ if (obj->version >= 18) {
+ state->referrer_policy =
+ static_cast<blink::WebReferrerPolicy>(ReadInteger(obj));
+ }
bool has_state_object = ReadBoolean(obj);
if (has_state_object)
@@ -666,7 +672,8 @@ ExplodedFrameState::ExplodedFrameState()
: item_sequence_number(0),
document_sequence_number(0),
target_frame_id(0),
- page_scale_factor(0.0) {
+ page_scale_factor(0.0),
+ referrer_policy(blink::WebReferrerPolicyDefault) {
}
ExplodedFrameState::~ExplodedFrameState() {