| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Portions of this code based on Mozilla: | 5 // Portions of this code based on Mozilla: |
| 6 // (netwerk/cookie/src/nsCookieService.cpp) | 6 // (netwerk/cookie/src/nsCookieService.cpp) |
| 7 /* ***** BEGIN LICENSE BLOCK ***** | 7 /* ***** BEGIN LICENSE BLOCK ***** |
| 8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 9 * | 9 * |
| 10 * The contents of this file are subject to the Mozilla Public License Version | 10 * The contents of this file are subject to the Mozilla Public License Version |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 return NULL; | 228 return NULL; |
| 229 } | 229 } |
| 230 | 230 |
| 231 if (options.exclude_httponly() && parsed_cookie.IsHttpOnly()) { | 231 if (options.exclude_httponly() && parsed_cookie.IsHttpOnly()) { |
| 232 VLOG(kVlogSetCookies) << "Create() is not creating a httponly cookie"; | 232 VLOG(kVlogSetCookies) << "Create() is not creating a httponly cookie"; |
| 233 return NULL; | 233 return NULL; |
| 234 } | 234 } |
| 235 | 235 |
| 236 std::string cookie_domain; | 236 std::string cookie_domain; |
| 237 if (!GetCookieDomain(url, parsed_cookie, &cookie_domain)) { | 237 if (!GetCookieDomain(url, parsed_cookie, &cookie_domain)) { |
| 238 VLOG(kVlogSetCookies) << "Create() failed to get a cookie domain"; |
| 238 return NULL; | 239 return NULL; |
| 239 } | 240 } |
| 240 | 241 |
| 241 std::string cookie_path = CanonicalCookie::CanonPath(url, parsed_cookie); | 242 std::string cookie_path = CanonicalCookie::CanonPath(url, parsed_cookie); |
| 242 Time server_time(creation_time); | 243 Time server_time(creation_time); |
| 243 if (options.has_server_time()) | 244 if (options.has_server_time()) |
| 244 server_time = options.server_time(); | 245 server_time = options.server_time(); |
| 245 | 246 |
| 246 Time cookie_expires = CanonicalCookie::CanonExpiration(parsed_cookie, | 247 Time cookie_expires = CanonicalCookie::CanonExpiration(parsed_cookie, |
| 247 creation_time, | 248 creation_time, |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 if (IsSecure() != other.IsSecure()) | 442 if (IsSecure() != other.IsSecure()) |
| 442 return IsSecure(); | 443 return IsSecure(); |
| 443 | 444 |
| 444 if (IsHttpOnly() != other.IsHttpOnly()) | 445 if (IsHttpOnly() != other.IsHttpOnly()) |
| 445 return IsHttpOnly(); | 446 return IsHttpOnly(); |
| 446 | 447 |
| 447 return Priority() < other.Priority(); | 448 return Priority() < other.Priority(); |
| 448 } | 449 } |
| 449 | 450 |
| 450 } // namespace net | 451 } // namespace net |
| OLD | NEW |