Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: net/cookies/cookie_store.h

Issue 2908443002: Initial implementation of Cookie service.
Patch Set: Got initial implementation compiling. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22 matching lines...) Expand all
33 public: 33 public:
34 // The publicly relevant reasons a cookie might be changed. 34 // The publicly relevant reasons a cookie might be changed.
35 enum class ChangeCause { 35 enum class ChangeCause {
36 // The cookie was inserted. 36 // The cookie was inserted.
37 INSERTED, 37 INSERTED,
38 // The cookie was changed directly by a consumer's action. 38 // The cookie was changed directly by a consumer's action.
39 EXPLICIT, 39 EXPLICIT,
40 // The following four values have the same meaning as EXPLICIT, but are 40 // The following four values have the same meaning as EXPLICIT, but are
41 // being used to track down where a bug is coming from. 41 // being used to track down where a bug is coming from.
42 // TODO(nharper): Remove the following four values once the one of interest 42 // TODO(nharper): Remove the following four values once the one of interest
43 // has been found. 43 // has been found. See http://crbug.com/548423.
44 EXPLICIT_DELETE_BETWEEN, 44 EXPLICIT_DELETE_BETWEEN,
45 EXPLICIT_DELETE_PREDICATE, 45 EXPLICIT_DELETE_PREDICATE,
46 EXPLICIT_DELETE_SINGLE, 46 EXPLICIT_DELETE_SINGLE,
47 EXPLICIT_DELETE_CANONICAL, 47 EXPLICIT_DELETE_CANONICAL,
48 // The cookie was deleted, but no more details are known. 48 // The cookie was deleted, but no more details are known.
49 UNKNOWN_DELETION, 49 UNKNOWN_DELETION,
50 // The cookie was automatically removed due to an insert operation that 50 // The cookie was automatically removed due to an insert operation that
51 // overwrote it. 51 // overwrote it.
52 OVERWRITE, 52 OVERWRITE,
53 // The cookie was automatically removed as it expired. 53 // The cookie was automatically removed as it expired.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 // Deletes all of the cookies that have a creation_date greater than or equal 194 // Deletes all of the cookies that have a creation_date greater than or equal
195 // to |delete_begin| and less than |delete_end| 195 // to |delete_begin| and less than |delete_end|
196 // Calls |callback| with the number of cookies deleted. 196 // Calls |callback| with the number of cookies deleted.
197 virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, 197 virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
198 const base::Time& delete_end, 198 const base::Time& delete_end,
199 DeleteCallback callback) = 0; 199 DeleteCallback callback) = 0;
200 200
201 // Deletes all of the cookies that match the given predicate and that have a 201 // Deletes all of the cookies that match the given predicate and that have a
202 // creation_date greater than or equal to |delete_begin| and smaller than 202 // creation_date greater than or equal to |delete_begin| and smaller than
203 // |delete_end|. This includes all http_only and secure cookies. Avoid 203 // |delete_end|. Null times do not cap their ranges (i.e.
204 // deleting cookies that could leave websites with a partial set of visible 204 // |delete_end.is_null()| would mean that there is no time after which
205 // cookies. 205 // cookies are not deleted). This includes all http_only and secure
206 // cookies. Avoid deleting cookies that could leave websites with a
207 // partial set of visible cookies.
206 // Calls |callback| with the number of cookies deleted. 208 // Calls |callback| with the number of cookies deleted.
207 virtual void DeleteAllCreatedBetweenWithPredicateAsync( 209 virtual void DeleteAllCreatedBetweenWithPredicateAsync(
208 const base::Time& delete_begin, 210 const base::Time& delete_begin,
209 const base::Time& delete_end, 211 const base::Time& delete_end,
210 const CookiePredicate& predicate, 212 const CookiePredicate& predicate,
211 DeleteCallback callback) = 0; 213 DeleteCallback callback) = 0;
212 214
213 virtual void DeleteSessionCookiesAsync(DeleteCallback) = 0; 215 virtual void DeleteSessionCookiesAsync(DeleteCallback) = 0;
214 216
215 // Deletes all cookies in the store. 217 // Deletes all cookies in the store.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 int GetChannelIDServiceID(); 257 int GetChannelIDServiceID();
256 258
257 protected: 259 protected:
258 CookieStore(); 260 CookieStore();
259 int channel_id_service_id_; 261 int channel_id_service_id_;
260 }; 262 };
261 263
262 } // namespace net 264 } // namespace net
263 265
264 #endif // NET_COOKIES_COOKIE_STORE_H_ 266 #endif // NET_COOKIES_COOKIE_STORE_H_
OLDNEW
« content/common/cookies_traits.cc ('K') | « net/cookies/cookie_options.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698