| 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 <deque> | 10 #include <deque> |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 // monster's existence. If |store| is NULL, then no backing store will be | 139 // monster's existence. If |store| is NULL, then no backing store will be |
| 140 // updated. If |delegate| is non-NULL, it will be notified on | 140 // updated. If |delegate| is non-NULL, it will be notified on |
| 141 // creation/deletion of cookies. | 141 // creation/deletion of cookies. |
| 142 CookieMonster(PersistentCookieStore* store, CookieMonsterDelegate* delegate); | 142 CookieMonster(PersistentCookieStore* store, CookieMonsterDelegate* delegate); |
| 143 | 143 |
| 144 // Only used during unit testing. | 144 // Only used during unit testing. |
| 145 CookieMonster(PersistentCookieStore* store, | 145 CookieMonster(PersistentCookieStore* store, |
| 146 CookieMonsterDelegate* delegate, | 146 CookieMonsterDelegate* delegate, |
| 147 int last_access_threshold_milliseconds); | 147 int last_access_threshold_milliseconds); |
| 148 | 148 |
| 149 // Helper function that adds all cookies from |list| into this instance. | 149 // Helper function that adds all cookies from |list| into this instance, |
| 150 bool InitializeFrom(const CookieList& list); | 150 // overwriting any equivalent cookies. |
| 151 bool ImportCookies(const CookieList& list); |
| 151 | 152 |
| 152 typedef base::Callback<void(const CookieList& cookies)> GetCookieListCallback; | 153 typedef base::Callback<void(const CookieList& cookies)> GetCookieListCallback; |
| 153 typedef base::Callback<void(bool success)> DeleteCookieCallback; | 154 typedef base::Callback<void(bool success)> DeleteCookieCallback; |
| 154 typedef base::Callback<void(bool cookies_exist)> HasCookiesForETLDP1Callback; | 155 typedef base::Callback<void(bool cookies_exist)> HasCookiesForETLDP1Callback; |
| 155 | 156 |
| 156 // Sets a cookie given explicit user-provided cookie attributes. The cookie | 157 // Sets a cookie given explicit user-provided cookie attributes. The cookie |
| 157 // name, value, domain, etc. are each provided as separate strings. This | 158 // name, value, domain, etc. are each provided as separate strings. This |
| 158 // function expects each attribute to be well-formed. It will check for | 159 // function expects each attribute to be well-formed. It will check for |
| 159 // disallowed characters (e.g. the ';' character is disallowed within the | 160 // disallowed characters (e.g. the ';' character is disallowed within the |
| 160 // cookie value attribute) and will return false without setting the cookie | 161 // cookie value attribute) and will return false without setting the cookie |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 virtual ~PersistentCookieStore() {} | 779 virtual ~PersistentCookieStore() {} |
| 779 | 780 |
| 780 private: | 781 private: |
| 781 friend class base::RefCountedThreadSafe<PersistentCookieStore>; | 782 friend class base::RefCountedThreadSafe<PersistentCookieStore>; |
| 782 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); | 783 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); |
| 783 }; | 784 }; |
| 784 | 785 |
| 785 } // namespace net | 786 } // namespace net |
| 786 | 787 |
| 787 #endif // NET_COOKIES_COOKIE_MONSTER_H_ | 788 #endif // NET_COOKIES_COOKIE_MONSTER_H_ |
| OLD | NEW |