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 #ifndef NET_COOKIES_CANONICAL_COOKIE_H_ | 5 #ifndef NET_COOKIES_CANONICAL_COOKIE_H_ |
6 #define NET_COOKIES_CANONICAL_COOKIE_H_ | 6 #define NET_COOKIES_CANONICAL_COOKIE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Returns true if the cookie should be included for the given request |url|. | 132 // Returns true if the cookie should be included for the given request |url|. |
133 // HTTP only cookies can be filter by using appropriate cookie |options|. | 133 // HTTP only cookies can be filter by using appropriate cookie |options|. |
134 // PLEASE NOTE that this method does not check whether a cookie is expired or | 134 // PLEASE NOTE that this method does not check whether a cookie is expired or |
135 // not! | 135 // not! |
136 bool IncludeForRequestURL(const GURL& url, | 136 bool IncludeForRequestURL(const GURL& url, |
137 const CookieOptions& options) const; | 137 const CookieOptions& options) const; |
138 | 138 |
139 std::string DebugString() const; | 139 std::string DebugString() const; |
140 | 140 |
141 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); | 141 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); |
142 | |
143 // Returns a "null" time if expiration was unspecified or invalid. | |
144 static base::Time CanonExpiration(const ParsedCookie& pc, | 142 static base::Time CanonExpiration(const ParsedCookie& pc, |
145 const base::Time& current, | 143 const base::Time& current, |
146 const base::Time& server_time); | 144 const base::Time& server_time); |
147 | 145 |
148 // Cookie ordering methods. | 146 // Cookie ordering methods. |
149 | 147 |
150 // Returns true if the cookie is less than |other|, considering only name, | 148 // Returns true if the cookie is less than |other|, considering only name, |
151 // domain and path. In particular, two equivalent cookies (see IsEquivalent()) | 149 // domain and path. In particular, two equivalent cookies (see IsEquivalent()) |
152 // are identical for PartialCompare(). | 150 // are identical for PartialCompare(). |
153 bool PartialCompare(const CanonicalCookie& other) const; | 151 bool PartialCompare(const CanonicalCookie& other) const; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 bool httponly_; | 212 bool httponly_; |
215 CookieSameSite same_site_; | 213 CookieSameSite same_site_; |
216 CookiePriority priority_; | 214 CookiePriority priority_; |
217 }; | 215 }; |
218 | 216 |
219 typedef std::vector<CanonicalCookie> CookieList; | 217 typedef std::vector<CanonicalCookie> CookieList; |
220 | 218 |
221 } // namespace net | 219 } // namespace net |
222 | 220 |
223 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ | 221 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ |
OLD | NEW |