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

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

Issue 869613006: Move referrer policy to a different field when serializing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 11 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_driver.h
diff --git a/components/sessions/core/serialized_navigation_driver.h b/components/sessions/core/serialized_navigation_driver.h
index fafaa27d29dfb09f41bfe89b09464da6c503ecbc..8702f867aa51aeb3928699539cf30af916b52d18 100644
--- a/components/sessions/core/serialized_navigation_driver.h
+++ b/components/sessions/core/serialized_navigation_driver.h
@@ -25,6 +25,18 @@ class SESSIONS_EXPORT_PRIVATE SerializedNavigationDriver {
// Returns the default referrer policy.
virtual int GetDefaultReferrerPolicy() const = 0;
+ // Maps current referrer policies to old values to work around
+ // crbug.com/450589. Returns false if the referrer should be stripped.
+ virtual bool MapReferrerPolicyToOldValues(
+ int referrer_policy,
+ int* mapped_referrer_policy) const = 0;
+
+ // Sanitizes a referrer policy that might either be in the old or the new
+ // format. Returns false if the referrer should be stripped.
+ virtual bool MapReferrerPolicyToNewValues(
+ int referrer_policy,
+ int* mapped_referrer_policy) const = 0;
+
// Returns a sanitized version of the given |navigation|'s encoded_page_state
// suitable for writing to disk.
virtual std::string GetSanitizedPageStateForPickle(

Powered by Google App Engine
This is Rietveld 408576698