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

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

Issue 2649083002: Divide CookieStoreIOS into two different classes with different backends (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « ios/net/cookies/cookie_store_ios.mm ('k') | ios/net/cookies/cookie_store_ios_persistent.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_
6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/time/time.h"
11 #import "ios/net/cookies/cookie_store_ios.h"
12 #include "net/cookies/cookie_monster.h"
13 #include "net/cookies/cookie_store.h"
14 #include "url/gurl.h"
15
16 @class NSHTTPCookieStorage;
17
18 namespace net {
19
20 // The CookieStoreIOSPersistent is an implementation of CookieStore relying on
21 // on backing CookieStore.
22 // CookieStoreIOSPersistent is not thread safe.
23 //
24 // All the changes are written back to the backing CookieStore.
25 // For synchronized CookieStore, please see CookieStoreIOS.
26 class CookieStoreIOSPersistent : public CookieStoreIOS {
Eugene But (OOO till 7-30) 2017/01/27 19:30:06 I suspect that it is possible to avoid this inheri
maksims (do not use this acc) 2017/01/30 10:37:13 Done.
27 public:
28 // Creates a CookieStoreIOS with a default value of
29 // |NSHTTPCookieStorage sharedCookieStorage| as the system's cookie store.
30 explicit CookieStoreIOSPersistent(
31 net::CookieMonster::PersistentCookieStore* persistent_store);
32
33 ~CookieStoreIOSPersistent() override;
34
35 // Inherited CookieStore methods.
36 void SetCookieWithOptionsAsync(const GURL& url,
37 const std::string& cookie_line,
38 const net::CookieOptions& options,
39 const SetCookiesCallback& callback) override;
40 void SetCookieWithDetailsAsync(const GURL& url,
41 const std::string& name,
42 const std::string& value,
43 const std::string& domain,
44 const std::string& path,
45 base::Time creation_time,
46 base::Time expiration_time,
47 base::Time last_access_time,
48 bool secure,
49 bool http_only,
50 CookieSameSite same_site,
51 bool enforce_strict_secure,
52 CookiePriority priority,
53 const SetCookiesCallback& callback) override;
54 void GetCookiesWithOptionsAsync(const GURL& url,
55 const net::CookieOptions& options,
56 const GetCookiesCallback& callback) override;
57 void GetCookieListWithOptionsAsync(
58 const GURL& url,
59 const net::CookieOptions& options,
60 const GetCookieListCallback& callback) override;
61 void GetAllCookiesAsync(const GetCookieListCallback& callback) override;
62 void DeleteCookieAsync(const GURL& url,
63 const std::string& cookie_name,
64 const base::Closure& callback) override;
65 void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie,
66 const DeleteCallback& callback) override;
67 void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
68 const base::Time& delete_end,
69 const DeleteCallback& callback) override;
70 void DeleteAllCreatedBetweenWithPredicateAsync(
71 const base::Time& delete_begin,
72 const base::Time& delete_end,
73 const CookiePredicate& predicate,
74 const DeleteCallback& callback) override;
75 void DeleteSessionCookiesAsync(const DeleteCallback& callback) override;
76
77 private:
78 // No-op functions for this class.
79 void WriteToCookieMonster(NSArray* system_cookies) override;
80 void OnSystemCookiesChanged() override;
81
82 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSPersistent);
83 };
84
85 } // namespace net
86
87 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_
OLDNEW
« no previous file with comments | « ios/net/cookies/cookie_store_ios.mm ('k') | ios/net/cookies/cookie_store_ios_persistent.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698