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 // Brought to you by number 42. | 5 // Brought to you by number 42. |
6 | 6 |
7 #ifndef NET_COOKIES_COOKIE_STORE_H_ | 7 #ifndef NET_COOKIES_COOKIE_STORE_H_ |
8 #define NET_COOKIES_COOKIE_STORE_H_ | 8 #define NET_COOKIES_COOKIE_STORE_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 const std::string& path, | 120 const std::string& path, |
121 base::Time creation_time, | 121 base::Time creation_time, |
122 base::Time expiration_time, | 122 base::Time expiration_time, |
123 base::Time last_access_time, | 123 base::Time last_access_time, |
124 bool secure, | 124 bool secure, |
125 bool http_only, | 125 bool http_only, |
126 CookieSameSite same_site, | 126 CookieSameSite same_site, |
127 CookiePriority priority, | 127 CookiePriority priority, |
128 const SetCookiesCallback& callback) = 0; | 128 const SetCookiesCallback& callback) = 0; |
129 | 129 |
| 130 // TODO(rdsmith): Remove SetCookieWithDetailsAsync in favor of this. |
| 131 // Set the cookie on the cookie store. |cookie.IsCanonical()| must |
| 132 // be true. |secure_source| indicates if the source of the setting |
| 133 // may be considered secure (if from a URL, the scheme is |
| 134 // cryptographic), and |modify_http_only| indicates if the source of |
| 135 // the setting may modify http_only cookies. The current time will |
| 136 // be used in place of a null creation time. |
| 137 virtual void SetCanonicalCookieAsync(std::unique_ptr<CanonicalCookie> cookie, |
| 138 bool secure_source, |
| 139 bool modify_http_only, |
| 140 const SetCookiesCallback& callback) = 0; |
| 141 |
130 // TODO(???): what if the total size of all the cookies >4k, can we have a | 142 // TODO(???): what if the total size of all the cookies >4k, can we have a |
131 // header that big or do we need multiple Cookie: headers? | 143 // header that big or do we need multiple Cookie: headers? |
132 // Note: Some sites, such as Facebook, occasionally use Cookie headers >4k. | 144 // Note: Some sites, such as Facebook, occasionally use Cookie headers >4k. |
133 // | 145 // |
134 // Simple interface, gets a cookie string "a=b; c=d" for the given URL. | 146 // Simple interface, gets a cookie string "a=b; c=d" for the given URL. |
135 // Gets all cookies that apply to |url| given |options|. Use options to | 147 // Gets all cookies that apply to |url| given |options|. Use options to |
136 // access httponly cookies. | 148 // access httponly cookies. |
137 // | 149 // |
138 // The returned cookies are ordered by longest path, then earliest | 150 // The returned cookies are ordered by longest path, then earliest |
139 // creation date. | 151 // creation date. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 int GetChannelIDServiceID(); | 255 int GetChannelIDServiceID(); |
244 | 256 |
245 protected: | 257 protected: |
246 CookieStore(); | 258 CookieStore(); |
247 int channel_id_service_id_; | 259 int channel_id_service_id_; |
248 }; | 260 }; |
249 | 261 |
250 } // namespace net | 262 } // namespace net |
251 | 263 |
252 #endif // NET_COOKIES_COOKIE_STORE_H_ | 264 #endif // NET_COOKIES_COOKIE_STORE_H_ |
OLD | NEW |