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

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

Issue 2937963003: Shift cookie system callbacks to OnceCallback to impedance match mojo. (Closed)
Patch Set: Finish Merge 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 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_PERSISTENT_H_ 5 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_
6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_ 6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 21 matching lines...) Expand all
32 // |NSHTTPCookieStorage sharedCookieStorage| as the system's cookie store. 32 // |NSHTTPCookieStorage sharedCookieStorage| as the system's cookie store.
33 explicit CookieStoreIOSPersistent( 33 explicit CookieStoreIOSPersistent(
34 net::CookieMonster::PersistentCookieStore* persistent_store); 34 net::CookieMonster::PersistentCookieStore* persistent_store);
35 35
36 ~CookieStoreIOSPersistent() override; 36 ~CookieStoreIOSPersistent() override;
37 37
38 // Inherited CookieStore methods. 38 // Inherited CookieStore methods.
39 void SetCookieWithOptionsAsync(const GURL& url, 39 void SetCookieWithOptionsAsync(const GURL& url,
40 const std::string& cookie_line, 40 const std::string& cookie_line,
41 const net::CookieOptions& options, 41 const net::CookieOptions& options,
42 const SetCookiesCallback& callback) override; 42 SetCookiesCallback callback) override;
43 void SetCookieWithDetailsAsync(const GURL& url, 43 void SetCookieWithDetailsAsync(const GURL& url,
44 const std::string& name, 44 const std::string& name,
45 const std::string& value, 45 const std::string& value,
46 const std::string& domain, 46 const std::string& domain,
47 const std::string& path, 47 const std::string& path,
48 base::Time creation_time, 48 base::Time creation_time,
49 base::Time expiration_time, 49 base::Time expiration_time,
50 base::Time last_access_time, 50 base::Time last_access_time,
51 bool secure, 51 bool secure,
52 bool http_only, 52 bool http_only,
53 CookieSameSite same_site, 53 CookieSameSite same_site,
54 CookiePriority priority, 54 CookiePriority priority,
55 const SetCookiesCallback& callback) override; 55 SetCookiesCallback callback) override;
56 void SetCanonicalCookieAsync(std::unique_ptr<CanonicalCookie> cookie, 56 void SetCanonicalCookieAsync(std::unique_ptr<CanonicalCookie> cookie,
57 bool secure_source, 57 bool secure_source,
58 bool modify_http_only, 58 bool modify_http_only,
59 const SetCookiesCallback& callback) override; 59 SetCookiesCallback callback) override;
60 void GetCookiesWithOptionsAsync(const GURL& url, 60 void GetCookiesWithOptionsAsync(const GURL& url,
61 const net::CookieOptions& options, 61 const net::CookieOptions& options,
62 const GetCookiesCallback& callback) override; 62 GetCookiesCallback callback) override;
63 void GetCookieListWithOptionsAsync( 63 void GetCookieListWithOptionsAsync(const GURL& url,
64 const GURL& url, 64 const net::CookieOptions& options,
65 const net::CookieOptions& options, 65 GetCookieListCallback callback) override;
66 const GetCookieListCallback& callback) override; 66 void GetAllCookiesAsync(GetCookieListCallback callback) override;
67 void GetAllCookiesAsync(const GetCookieListCallback& callback) override;
68 void DeleteCookieAsync(const GURL& url, 67 void DeleteCookieAsync(const GURL& url,
69 const std::string& cookie_name, 68 const std::string& cookie_name,
70 const base::Closure& callback) override; 69 base::OnceClosure callback) override;
71 void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie, 70 void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie,
72 const DeleteCallback& callback) override; 71 DeleteCallback callback) override;
73 void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, 72 void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
74 const base::Time& delete_end, 73 const base::Time& delete_end,
75 const DeleteCallback& callback) override; 74 DeleteCallback callback) override;
76 void DeleteAllCreatedBetweenWithPredicateAsync( 75 void DeleteAllCreatedBetweenWithPredicateAsync(
77 const base::Time& delete_begin, 76 const base::Time& delete_begin,
78 const base::Time& delete_end, 77 const base::Time& delete_end,
79 const CookiePredicate& predicate, 78 const CookiePredicate& predicate,
80 const DeleteCallback& callback) override; 79 DeleteCallback callback) override;
81 void DeleteSessionCookiesAsync(const DeleteCallback& callback) override; 80 void DeleteSessionCookiesAsync(DeleteCallback callback) override;
82 81
83 private: 82 private:
84 // No-op functions for this class. 83 // No-op functions for this class.
85 void WriteToCookieMonster(NSArray* system_cookies) override; 84 void WriteToCookieMonster(NSArray* system_cookies) override;
86 void OnSystemCookiesChanged() override; 85 void OnSystemCookiesChanged() override;
87 86
88 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSPersistent); 87 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSPersistent);
89 }; 88 };
90 89
91 } // namespace net 90 } // namespace net
92 91
93 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_ 92 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698