Chromium Code Reviews| Index: net/cookies/cookie_constants.h |
| diff --git a/net/cookies/cookie_constants.h b/net/cookies/cookie_constants.h |
| index 7e27e14657d24d44945e5d34ec57620897e7fa86..49dafbdb3a12af6958da42788285f86b8db51497 100644 |
| --- a/net/cookies/cookie_constants.h |
| +++ b/net/cookies/cookie_constants.h |
| @@ -18,13 +18,27 @@ enum CookiePriority { |
| COOKIE_PRIORITY_DEFAULT = COOKIE_PRIORITY_MEDIUM |
| }; |
| +enum class CookieSameSite { |
| + NO_RESTRICTION = 0, |
| + LAX_MODE = 1, |
| + STRICT_MODE = 2, |
|
Mike West
2016/03/14 15:15:08
Windows has a "STRICT" macro. So.. "STRICT_MODE"?
mmenke
2016/03/14 20:14:50
Clearly we should rework the draft spec to avoid c
|
| + DEFAULT_MODE = NO_RESTRICTION |
| +}; |
| + |
| // Returns the Set-Cookie header priority token corresponding to |priority|. |
| -NET_EXPORT const std::string CookiePriorityToString(CookiePriority priority); |
| +// |
| +// TODO(mkwst): Remove this once its callsites are refactored. |
| +NET_EXPORT std::string CookiePriorityToString(CookiePriority priority); |
| // Converts the Set-Cookie header priority token |priority| to a CookiePriority. |
| // Defaults to COOKIE_PRIORITY_DEFAULT for empty or unrecognized strings. |
| NET_EXPORT CookiePriority StringToCookiePriority(const std::string& priority); |
| +// Converst the Set-Cookie header SameSite token |same_site| to a |
| +// CookieSameSite. Defaults to CookieSameSite::DEFAULT_MODE for empty or |
| +// unrecognized strings. |
| +NET_EXPORT CookieSameSite StringToCookieSameSite(const std::string& same_site); |
| + |
| } // namespace net |
| #endif // NET_COOKIES_COOKIE_CONSTANTS_H_ |