| 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 the letter D and the number 2. | 5 // Brought to you by the letter D and the number 2. |
| 6 | 6 |
| 7 #ifndef NET_COOKIES_COOKIE_MONSTER_H_ | 7 #ifndef NET_COOKIES_COOKIE_MONSTER_H_ |
| 8 #define NET_COOKIES_COOKIE_MONSTER_H_ | 8 #define NET_COOKIES_COOKIE_MONSTER_H_ |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie, | 181 void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie, |
| 182 const DeleteCallback& callback) override; | 182 const DeleteCallback& callback) override; |
| 183 void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, | 183 void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, |
| 184 const base::Time& delete_end, | 184 const base::Time& delete_end, |
| 185 const DeleteCallback& callback) override; | 185 const DeleteCallback& callback) override; |
| 186 void DeleteAllCreatedBetweenForHostAsync( | 186 void DeleteAllCreatedBetweenForHostAsync( |
| 187 const base::Time delete_begin, | 187 const base::Time delete_begin, |
| 188 const base::Time delete_end, | 188 const base::Time delete_end, |
| 189 const GURL& url, | 189 const GURL& url, |
| 190 const DeleteCallback& callback) override; | 190 const DeleteCallback& callback) override; |
| 191 void DeleteAllCreatedBetweenWithPredicateAsync( |
| 192 const base::Time& delete_begin, |
| 193 const base::Time& delete_end, |
| 194 const base::Callback<bool(const CanonicalCookie&)>& predicate, |
| 195 const DeleteCallback& callback) override; |
| 191 void DeleteSessionCookiesAsync(const DeleteCallback&) override; | 196 void DeleteSessionCookiesAsync(const DeleteCallback&) override; |
| 192 void FlushStore(const base::Closure& callback) override; | 197 void FlushStore(const base::Closure& callback) override; |
| 193 void SetForceKeepSessionState() override; | 198 void SetForceKeepSessionState() override; |
| 194 | 199 |
| 195 // Resets the list of cookieable schemes to the supplied schemes. Does | 200 // Resets the list of cookieable schemes to the supplied schemes. Does |
| 196 // nothing if called after first use of the instance (i.e. after the | 201 // nothing if called after first use of the instance (i.e. after the |
| 197 // instance initialization process). | 202 // instance initialization process). |
| 198 void SetCookieableSchemes(const std::vector<std::string>& schemes); | 203 void SetCookieableSchemes(const std::vector<std::string>& schemes); |
| 199 | 204 |
| 200 // Enables writing session cookies into the cookie database. If this this | 205 // Enables writing session cookies into the cookie database. If this this |
| (...skipping 14 matching lines...) Expand all Loading... |
| 215 const std::string& name, | 220 const std::string& name, |
| 216 const CookieChangedCallback& callback) override; | 221 const CookieChangedCallback& callback) override; |
| 217 | 222 |
| 218 private: | 223 private: |
| 219 // For queueing the cookie monster calls. | 224 // For queueing the cookie monster calls. |
| 220 class CookieMonsterTask; | 225 class CookieMonsterTask; |
| 221 template <typename Result> | 226 template <typename Result> |
| 222 class DeleteTask; | 227 class DeleteTask; |
| 223 class DeleteAllCreatedBetweenTask; | 228 class DeleteAllCreatedBetweenTask; |
| 224 class DeleteAllCreatedBetweenForHostTask; | 229 class DeleteAllCreatedBetweenForHostTask; |
| 230 class DeleteAllCreatedBetweenWithPredicateTask; |
| 225 class DeleteCookieTask; | 231 class DeleteCookieTask; |
| 226 class DeleteCanonicalCookieTask; | 232 class DeleteCanonicalCookieTask; |
| 227 class GetCookieListForURLWithOptionsTask; | 233 class GetCookieListForURLWithOptionsTask; |
| 228 class GetAllCookiesTask; | 234 class GetAllCookiesTask; |
| 229 class GetCookiesWithOptionsTask; | 235 class GetCookiesWithOptionsTask; |
| 230 class GetCookieListWithOptionsTask; | 236 class GetCookieListWithOptionsTask; |
| 231 class SetAllCookiesTask; | 237 class SetAllCookiesTask; |
| 232 class SetCookieWithDetailsTask; | 238 class SetCookieWithDetailsTask; |
| 233 class SetCookieWithOptionsTask; | 239 class SetCookieWithOptionsTask; |
| 234 class DeleteSessionCookiesTask; | 240 class DeleteSessionCookiesTask; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 CookieList GetCookieListWithOptions(const GURL& url, | 407 CookieList GetCookieListWithOptions(const GURL& url, |
| 402 const CookieOptions& options); | 408 const CookieOptions& options); |
| 403 | 409 |
| 404 int DeleteAllCreatedBetween(const base::Time& delete_begin, | 410 int DeleteAllCreatedBetween(const base::Time& delete_begin, |
| 405 const base::Time& delete_end); | 411 const base::Time& delete_end); |
| 406 | 412 |
| 407 int DeleteAllCreatedBetweenForHost(const base::Time delete_begin, | 413 int DeleteAllCreatedBetweenForHost(const base::Time delete_begin, |
| 408 const base::Time delete_end, | 414 const base::Time delete_end, |
| 409 const GURL& url); | 415 const GURL& url); |
| 410 | 416 |
| 417 // Predicate will be called with the calling thread. |
| 418 int DeleteAllCreatedBetweenWithPredicate( |
| 419 const base::Time& delete_begin, |
| 420 const base::Time& delete_end, |
| 421 const base::Callback<bool(const CanonicalCookie&)>& predicate); |
| 422 |
| 411 bool SetCookieWithOptions(const GURL& url, | 423 bool SetCookieWithOptions(const GURL& url, |
| 412 const std::string& cookie_line, | 424 const std::string& cookie_line, |
| 413 const CookieOptions& options); | 425 const CookieOptions& options); |
| 414 | 426 |
| 415 std::string GetCookiesWithOptions(const GURL& url, | 427 std::string GetCookiesWithOptions(const GURL& url, |
| 416 const CookieOptions& options); | 428 const CookieOptions& options); |
| 417 | 429 |
| 418 void DeleteCookie(const GURL& url, const std::string& cookie_name); | 430 void DeleteCookie(const GURL& url, const std::string& cookie_name); |
| 419 | 431 |
| 420 int DeleteCanonicalCookie(const CanonicalCookie& cookie); | 432 int DeleteCanonicalCookie(const CanonicalCookie& cookie); |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 virtual ~PersistentCookieStore() {} | 800 virtual ~PersistentCookieStore() {} |
| 789 | 801 |
| 790 private: | 802 private: |
| 791 friend class base::RefCountedThreadSafe<PersistentCookieStore>; | 803 friend class base::RefCountedThreadSafe<PersistentCookieStore>; |
| 792 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); | 804 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); |
| 793 }; | 805 }; |
| 794 | 806 |
| 795 } // namespace net | 807 } // namespace net |
| 796 | 808 |
| 797 #endif // NET_COOKIES_COOKIE_MONSTER_H_ | 809 #endif // NET_COOKIES_COOKIE_MONSTER_H_ |
| OLD | NEW |