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> |
| 11 |
10 #include <memory> | 12 #include <memory> |
11 #include <string> | 13 #include <string> |
12 #include <vector> | 14 #include <vector> |
13 | 15 |
14 #include "base/callback_forward.h" | 16 #include "base/callback_forward.h" |
15 #include "base/callback_list.h" | 17 #include "base/callback_list.h" |
16 #include "base/time/time.h" | 18 #include "base/time/time.h" |
17 #include "net/base/net_export.h" | 19 #include "net/base/net_export.h" |
18 #include "net/cookies/canonical_cookie.h" | 20 #include "net/cookies/canonical_cookie.h" |
19 #include "net/cookies/cookie_options.h" | 21 #include "net/cookies/cookie_options.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // cookie. This function assumes that ChangeCause::EXPLICIT is a reason for | 64 // cookie. This function assumes that ChangeCause::EXPLICIT is a reason for |
63 // deletion. | 65 // deletion. |
64 static bool ChangeCauseIsDeletion(ChangeCause cause); | 66 static bool ChangeCauseIsDeletion(ChangeCause cause); |
65 | 67 |
66 // Callback definitions. | 68 // Callback definitions. |
67 typedef base::OnceCallback<void(const CookieList& cookies)> | 69 typedef base::OnceCallback<void(const CookieList& cookies)> |
68 GetCookieListCallback; | 70 GetCookieListCallback; |
69 typedef base::OnceCallback<void(const std::string& cookie)> | 71 typedef base::OnceCallback<void(const std::string& cookie)> |
70 GetCookiesCallback; | 72 GetCookiesCallback; |
71 typedef base::OnceCallback<void(bool success)> SetCookiesCallback; | 73 typedef base::OnceCallback<void(bool success)> SetCookiesCallback; |
72 typedef base::OnceCallback<void(int num_deleted)> DeleteCallback; | 74 typedef base::OnceCallback<void(uint32_t num_deleted)> DeleteCallback; |
73 | 75 |
74 typedef base::Callback<void(const CanonicalCookie& cookie, ChangeCause cause)> | 76 typedef base::Callback<void(const CanonicalCookie& cookie, ChangeCause cause)> |
75 CookieChangedCallback; | 77 CookieChangedCallback; |
76 typedef base::CallbackList<void(const CanonicalCookie& cookie, | 78 typedef base::CallbackList<void(const CanonicalCookie& cookie, |
77 ChangeCause cause)> | 79 ChangeCause cause)> |
78 CookieChangedCallbackList; | 80 CookieChangedCallbackList; |
79 typedef CookieChangedCallbackList::Subscription CookieChangedSubscription; | 81 typedef CookieChangedCallbackList::Subscription CookieChangedSubscription; |
80 typedef base::Callback<bool(const CanonicalCookie& cookie)> CookiePredicate; | 82 typedef base::Callback<bool(const CanonicalCookie& cookie)> CookiePredicate; |
81 | 83 |
82 virtual ~CookieStore(); | 84 virtual ~CookieStore(); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_ |
OLD | NEW |