summaryrefslogtreecommitdiffstats
path: root/sync/protocol
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2015-01-29 10:32:56 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-29 18:35:13 +0000
commit31d74bdc6a4b3c9e766ae8fc9297f1db8fedff49 (patch)
treeab32b20cd2d270b205a801d1cd152260bbaed9e3 /sync/protocol
parentae4b5eecd062dc4d28356b9925752ca52f53c46c (diff)
downloadchromium_src-31d74bdc6a4b3c9e766ae8fc9297f1db8fedff49.zip
chromium_src-31d74bdc6a4b3c9e766ae8fc9297f1db8fedff49.tar.gz
chromium_src-31d74bdc6a4b3c9e766ae8fc9297f1db8fedff49.tar.bz2
Move referrer policy to a different field when serializing.
Also try to fix old entries when possible and play nice with older versions BUG=450589 R=mkwst@chromium.org,marja@chromium.org,atwilson@chromium.org Review URL: https://codereview.chromium.org/869613006 Cr-Commit-Position: refs/heads/master@{#313742}
Diffstat (limited to 'sync/protocol')
-rw-r--r--sync/protocol/proto_value_conversions.cc3
-rw-r--r--sync/protocol/session_specifics.proto8
2 files changed, 7 insertions, 4 deletions
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index 4d67632..377a432 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -211,10 +211,11 @@ base::DictionaryValue* TabNavigationToValue(
SET_ENUM(blocked_state, GetBlockedStateString);
SET_STR_REP(content_pack_categories);
SET_INT32(http_status_code);
- SET_INT32(referrer_policy);
+ SET_INT32(obsolete_referrer_policy);
SET_BOOL(is_restored);
SET_REP(navigation_redirect, NavigationRedirectToValue);
SET_STR(last_navigation_redirect_url);
+ SET_INT32(correct_referrer_policy);
return value;
}
diff --git a/sync/protocol/session_specifics.proto b/sync/protocol/session_specifics.proto
index a5a9f1b..2a0d903 100644
--- a/sync/protocol/session_specifics.proto
+++ b/sync/protocol/session_specifics.proto
@@ -137,9 +137,8 @@ message TabNavigation {
// The status code from the last navigation.
optional int32 http_status_code = 20;
- // Referrer policy. Valid enums are defined in
- // third_party/WebKit/public/platform/WebReferrerPolicy.h.
- optional int32 referrer_policy = 21 [default = 1];
+ // Referrer policy. Old, broken value.
+ optional int32 obsolete_referrer_policy = 21 [default = 1];
// True if created from restored navigation entry that hasn't been loaded.
optional bool is_restored = 22;
// The chain of redirections for this navigation, from the original URL
@@ -148,6 +147,9 @@ message TabNavigation {
// Normally not present.
// The last URL traversed when different from the virtual_url.
optional string last_navigation_redirect_url = 24;
+ // Correct referrer policy. Valid enums are defined in
+ // third_party/WebKit/public/platform/WebReferrerPolicy.h.
+ optional int32 correct_referrer_policy = 25 [default = 1];
}
// Navigation information for a single redirection within a single navigation.