| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // account, but the RFC doesn't specify this. | 103 // account, but the RFC doesn't specify this. |
| 104 // NOTE: Keep this logic in-sync with TrimDuplicateCookiesForHost(). | 104 // NOTE: Keep this logic in-sync with TrimDuplicateCookiesForHost(). |
| 105 return (name_ == ecc.Name() && domain_ == ecc.Domain() | 105 return (name_ == ecc.Name() && domain_ == ecc.Domain() |
| 106 && path_ == ecc.Path()); | 106 && path_ == ecc.Path()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void SetLastAccessDate(const base::Time& date) { | 109 void SetLastAccessDate(const base::Time& date) { |
| 110 last_access_date_ = date; | 110 last_access_date_ = date; |
| 111 } | 111 } |
| 112 | 112 |
| 113 // TODO: Make private. |
| 113 bool IsOnPath(const std::string& url_path) const; | 114 bool IsOnPath(const std::string& url_path) const; |
| 114 bool IsDomainMatch(const std::string& host) const; | 115 bool IsDomainMatch(const std::string& host) const; |
| 115 | 116 |
| 117 // TODO: Add comment. |
| 118 bool IncludeForRequest(const GURL& url) const; |
| 119 |
| 116 std::string DebugString() const; | 120 std::string DebugString() const; |
| 117 | 121 |
| 118 // Returns the cookie source when cookies are set for |url|. This function | 122 // Returns the cookie source when cookies are set for |url|. This function |
| 119 // is public for unit test purposes only. | 123 // is public for unit test purposes only. |
| 120 static std::string GetCookieSourceFromURL(const GURL& url); | 124 static std::string GetCookieSourceFromURL(const GURL& url); |
| 121 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); | 125 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); |
| 122 static base::Time CanonExpiration(const ParsedCookie& pc, | 126 static base::Time CanonExpiration(const ParsedCookie& pc, |
| 123 const base::Time& current, | 127 const base::Time& current, |
| 124 const base::Time& server_time); | 128 const base::Time& server_time); |
| 125 | 129 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 145 base::Time last_access_date_; | 149 base::Time last_access_date_; |
| 146 bool secure_; | 150 bool secure_; |
| 147 bool httponly_; | 151 bool httponly_; |
| 148 }; | 152 }; |
| 149 | 153 |
| 150 typedef std::vector<CanonicalCookie> CookieList; | 154 typedef std::vector<CanonicalCookie> CookieList; |
| 151 | 155 |
| 152 } // namespace net | 156 } // namespace net |
| 153 | 157 |
| 154 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ | 158 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ |
| OLD | NEW |