Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/cookies/cookie_constants.h" | 5 #include "net/cookies/cookie_constants.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 return COOKIE_PRIORITY_MEDIUM; | 43 return COOKIE_PRIORITY_MEDIUM; |
| 44 if (priority_comp == kPriorityLow) | 44 if (priority_comp == kPriorityLow) |
| 45 return COOKIE_PRIORITY_LOW; | 45 return COOKIE_PRIORITY_LOW; |
| 46 | 46 |
| 47 return COOKIE_PRIORITY_DEFAULT; | 47 return COOKIE_PRIORITY_DEFAULT; |
| 48 } | 48 } |
| 49 | 49 |
| 50 CookieSameSite StringToCookieSameSite(const std::string& same_site) { | 50 CookieSameSite StringToCookieSameSite(const std::string& same_site) { |
| 51 if (base::EqualsCaseInsensitiveASCII(same_site, kSameSiteLax)) | 51 if (base::EqualsCaseInsensitiveASCII(same_site, kSameSiteLax)) |
| 52 return CookieSameSite::LAX_MODE; | 52 return CookieSameSite::LAX_MODE; |
| 53 if (base::EqualsCaseInsensitiveASCII(same_site, kSameSiteStrict)) | 53 if (base::EqualsCaseInsensitiveASCII(same_site, kSameSiteStrict)) |
|
mmenke
2016/04/06 15:16:30
From spec:
1. If "cookie-av"'s "attribute-value"
| |
| 54 return CookieSameSite::STRICT_MODE; | 54 return CookieSameSite::STRICT_MODE; |
| 55 return CookieSameSite::DEFAULT_MODE; | 55 return CookieSameSite::INVALID_MODE; |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace net | 58 } // namespace net |
| OLD | NEW |