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

Side by Side Diff: ios/net/cookies/cookie_store_ios.h

Issue 2971733002: Change CookieStore::DeleteCallback to take uint32_t. (Closed)
Patch Set: Fixed Android webview compilation errors. Created 3 years, 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ 5 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_H_
6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ 6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_H_
7 7
8 #include <cstdint>
mmenke 2017/07/05 16:58:49 cstdint? stdint.h is what we normally included fo
Randy Smith (Not in Mondays) 2017/07/08 13:03:26 Done.
8 #include <map> 9 #include <map>
9 #include <memory> 10 #include <memory>
10 #include <string> 11 #include <string>
11 #include <utility> 12 #include <utility>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/callback.h" 15 #include "base/callback.h"
15 #include "base/cancelable_callback.h" 16 #include "base/cancelable_callback.h"
16 #include "base/mac/scoped_nsobject.h" 17 #include "base/mac/scoped_nsobject.h"
17 #include "base/macros.h" 18 #include "base/macros.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // that hooks get run, but only after the changes have been written back to 247 // that hooks get run, but only after the changes have been written back to
247 // CookieMonster. To do this, the mutators wrap the user-supplied callback in 248 // CookieMonster. To do this, the mutators wrap the user-supplied callback in
248 // a callback which schedules an asynchronous task to synchronize the cache 249 // a callback which schedules an asynchronous task to synchronize the cache
249 // and run callbacks, then calls through to the user-specified callback. 250 // and run callbacks, then calls through to the user-specified callback.
250 // 251 //
251 // These three UpdateCachesAfter functions are responsible for scheduling an 252 // These three UpdateCachesAfter functions are responsible for scheduling an
252 // asynchronous cache update (using UpdateCachesFromCookieMonster()) and 253 // asynchronous cache update (using UpdateCachesFromCookieMonster()) and
253 // calling the provided callback. 254 // calling the provided callback.
254 255
255 void UpdateCachesAfterSet(SetCookiesCallback callback, bool success); 256 void UpdateCachesAfterSet(SetCookiesCallback callback, bool success);
256 void UpdateCachesAfterDelete(DeleteCallback callback, int num_deleted); 257 void UpdateCachesAfterDelete(DeleteCallback callback, uint32_t num_deleted);
257 void UpdateCachesAfterClosure(base::OnceClosure callback); 258 void UpdateCachesAfterClosure(base::OnceClosure callback);
258 259
259 // Takes an NSArray of NSHTTPCookies as returns a net::CookieList. 260 // Takes an NSArray of NSHTTPCookies as returns a net::CookieList.
260 // The returned cookies are ordered by longest path, then earliest 261 // The returned cookies are ordered by longest path, then earliest
261 // creation date. 262 // creation date.
262 net::CookieList CanonicalCookieListFromSystemCookies(NSArray* cookies); 263 net::CookieList CanonicalCookieListFromSystemCookies(NSArray* cookies);
263 264
264 // Cached values of system cookies. Only cookies which have an observer added 265 // Cached values of system cookies. Only cookies which have an observer added
265 // with AddCallbackForCookie are kept in this cache. 266 // with AddCallbackForCookie are kept in this cache.
266 std::unique_ptr<CookieCache> cookie_cache_; 267 std::unique_ptr<CookieCache> cookie_cache_;
267 268
268 // Callbacks for cookie changes installed by AddCallbackForCookie. 269 // Callbacks for cookie changes installed by AddCallbackForCookie.
269 std::map<std::pair<GURL, std::string>, 270 std::map<std::pair<GURL, std::string>,
270 std::unique_ptr<CookieChangedCallbackList>> 271 std::unique_ptr<CookieChangedCallbackList>>
271 hook_map_; 272 hook_map_;
272 273
273 base::WeakPtrFactory<CookieStoreIOS> weak_factory_; 274 base::WeakPtrFactory<CookieStoreIOS> weak_factory_;
274 275
275 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOS); 276 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOS);
276 }; 277 };
277 278
278 } // namespace net 279 } // namespace net
279 280
280 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ 281 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698