| 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 <stdint.h> | 10 #include <stdint.h> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 // The publicly relevant reasons a cookie might be changed. | 36 // The publicly relevant reasons a cookie might be changed. |
| 37 enum class ChangeCause { | 37 enum class ChangeCause { |
| 38 // The cookie was inserted. | 38 // The cookie was inserted. |
| 39 INSERTED, | 39 INSERTED, |
| 40 // The cookie was changed directly by a consumer's action. | 40 // The cookie was changed directly by a consumer's action. |
| 41 EXPLICIT, | 41 EXPLICIT, |
| 42 // The following four values have the same meaning as EXPLICIT, but are | 42 // The following four values have the same meaning as EXPLICIT, but are |
| 43 // being used to track down where a bug is coming from. | 43 // being used to track down where a bug is coming from. |
| 44 // TODO(nharper): Remove the following four values once the one of interest | 44 // TODO(nharper): Remove the following four values once the one of interest |
| 45 // has been found. | 45 // has been found. See http://crbug.com/548423. |
| 46 EXPLICIT_DELETE_BETWEEN, | 46 EXPLICIT_DELETE_BETWEEN, |
| 47 EXPLICIT_DELETE_PREDICATE, | 47 EXPLICIT_DELETE_PREDICATE, |
| 48 EXPLICIT_DELETE_SINGLE, | 48 EXPLICIT_DELETE_SINGLE, |
| 49 EXPLICIT_DELETE_CANONICAL, | 49 EXPLICIT_DELETE_CANONICAL, |
| 50 // The cookie was deleted, but no more details are known. | 50 // The cookie was deleted, but no more details are known. |
| 51 UNKNOWN_DELETION, | 51 UNKNOWN_DELETION, |
| 52 // The cookie was automatically removed due to an insert operation that | 52 // The cookie was automatically removed due to an insert operation that |
| 53 // overwrote it. | 53 // overwrote it. |
| 54 OVERWRITE, | 54 OVERWRITE, |
| 55 // The cookie was automatically removed as it expired. | 55 // The cookie was automatically removed as it expired. |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 // Deletes all of the cookies that have a creation_date greater than or equal | 196 // Deletes all of the cookies that have a creation_date greater than or equal |
| 197 // to |delete_begin| and less than |delete_end| | 197 // to |delete_begin| and less than |delete_end| |
| 198 // Calls |callback| with the number of cookies deleted. | 198 // Calls |callback| with the number of cookies deleted. |
| 199 virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, | 199 virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, |
| 200 const base::Time& delete_end, | 200 const base::Time& delete_end, |
| 201 DeleteCallback callback) = 0; | 201 DeleteCallback callback) = 0; |
| 202 | 202 |
| 203 // Deletes all of the cookies that match the given predicate and that have a | 203 // Deletes all of the cookies that match the given predicate and that have a |
| 204 // creation_date greater than or equal to |delete_begin| and smaller than | 204 // creation_date greater than or equal to |delete_begin| and smaller than |
| 205 // |delete_end|. This includes all http_only and secure cookies. Avoid | 205 // |delete_end|. Null times do not cap their ranges (i.e. |
| 206 // deleting cookies that could leave websites with a partial set of visible | 206 // |delete_end.is_null()| would mean that there is no time after which |
| 207 // cookies. | 207 // cookies are not deleted). This includes all http_only and secure |
| 208 // cookies. Avoid deleting cookies that could leave websites with a |
| 209 // partial set of visible cookies. |
| 208 // Calls |callback| with the number of cookies deleted. | 210 // Calls |callback| with the number of cookies deleted. |
| 209 virtual void DeleteAllCreatedBetweenWithPredicateAsync( | 211 virtual void DeleteAllCreatedBetweenWithPredicateAsync( |
| 210 const base::Time& delete_begin, | 212 const base::Time& delete_begin, |
| 211 const base::Time& delete_end, | 213 const base::Time& delete_end, |
| 212 const CookiePredicate& predicate, | 214 const CookiePredicate& predicate, |
| 213 DeleteCallback callback) = 0; | 215 DeleteCallback callback) = 0; |
| 214 | 216 |
| 215 virtual void DeleteSessionCookiesAsync(DeleteCallback) = 0; | 217 virtual void DeleteSessionCookiesAsync(DeleteCallback) = 0; |
| 216 | 218 |
| 217 // Deletes all cookies in the store. | 219 // Deletes all cookies in the store. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 int GetChannelIDServiceID(); | 259 int GetChannelIDServiceID(); |
| 258 | 260 |
| 259 protected: | 261 protected: |
| 260 CookieStore(); | 262 CookieStore(); |
| 261 int channel_id_service_id_; | 263 int channel_id_service_id_; |
| 262 }; | 264 }; |
| 263 | 265 |
| 264 } // namespace net | 266 } // namespace net |
| 265 | 267 |
| 266 #endif // NET_COOKIES_COOKIE_STORE_H_ | 268 #endif // NET_COOKIES_COOKIE_STORE_H_ |
| OLD | NEW |