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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool IsOnPath(const std::string& url_path) const; | 113 bool IsOnPath(const std::string& url_path) const; |
114 bool IsDomainMatch(const std::string& scheme, const std::string& host) const; | 114 bool IsDomainMatch(const std::string& host) const; |
115 | 115 |
116 std::string DebugString() const; | 116 std::string DebugString() const; |
117 | 117 |
118 // Returns the cookie source when cookies are set for |url|. This function | 118 // Returns the cookie source when cookies are set for |url|. This function |
119 // is public for unit test purposes only. | 119 // is public for unit test purposes only. |
120 static std::string GetCookieSourceFromURL(const GURL& url); | 120 static std::string GetCookieSourceFromURL(const GURL& url); |
121 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); | 121 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); |
122 static base::Time CanonExpiration(const ParsedCookie& pc, | 122 static base::Time CanonExpiration(const ParsedCookie& pc, |
123 const base::Time& current, | 123 const base::Time& current, |
124 const base::Time& server_time); | 124 const base::Time& server_time); |
(...skipping 20 matching lines...) Expand all Loading... |
145 base::Time last_access_date_; | 145 base::Time last_access_date_; |
146 bool secure_; | 146 bool secure_; |
147 bool httponly_; | 147 bool httponly_; |
148 }; | 148 }; |
149 | 149 |
150 typedef std::vector<CanonicalCookie> CookieList; | 150 typedef std::vector<CanonicalCookie> CookieList; |
151 | 151 |
152 } // namespace net | 152 } // namespace net |
153 | 153 |
154 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ | 154 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ |
OLD | NEW |