| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Returns true if the cookie should be included for the given request |url|. | 119 // Returns true if the cookie should be included for the given request |url|. |
| 120 // HTTP only cookies can be filter by using appropriate cookie |options|. | 120 // HTTP only cookies can be filter by using appropriate cookie |options|. |
| 121 // PLEASE NOTE that this method does not check whether a cookie is expired or | 121 // PLEASE NOTE that this method does not check whether a cookie is expired or |
| 122 // not! | 122 // not! |
| 123 bool IncludeForRequestURL(const GURL& url, | 123 bool IncludeForRequestURL(const GURL& url, |
| 124 const CookieOptions& options) const; | 124 const CookieOptions& options) const; |
| 125 | 125 |
| 126 std::string DebugString() const; | 126 std::string DebugString() const; |
| 127 | 127 |
| 128 // Returns a duplicate of this cookie. | 128 // Returns a duplicate of this cookie. |
| 129 CanonicalCookie* Duplicate(); | 129 CanonicalCookie* Duplicate() const; |
| 130 | 130 |
| 131 // Returns the cookie source when cookies are set for |url|. This function | 131 // Returns the cookie source when cookies are set for |url|. This function |
| 132 // is public for unit test purposes only. | 132 // is public for unit test purposes only. |
| 133 static std::string GetCookieSourceFromURL(const GURL& url); | 133 static std::string GetCookieSourceFromURL(const GURL& url); |
| 134 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); | 134 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); |
| 135 static base::Time CanonExpiration(const ParsedCookie& pc, | 135 static base::Time CanonExpiration(const ParsedCookie& pc, |
| 136 const base::Time& current, | 136 const base::Time& current, |
| 137 const base::Time& server_time); | 137 const base::Time& server_time); |
| 138 | 138 |
| 139 private: | 139 private: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 162 // NOTE: When any new members are added above this comment, the | 162 // NOTE: When any new members are added above this comment, the |
| 163 // implementation of Duplicate() must be updated to copy the new member | 163 // implementation of Duplicate() must be updated to copy the new member |
| 164 // accordingly. | 164 // accordingly. |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 typedef std::vector<CanonicalCookie> CookieList; | 167 typedef std::vector<CanonicalCookie> CookieList; |
| 168 | 168 |
| 169 } // namespace net | 169 } // namespace net |
| 170 | 170 |
| 171 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ | 171 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ |
| OLD | NEW |