Chromium Code Reviews| Index: ios/net/cookies/cookie_store_ios_persistent.h |
| diff --git a/ios/net/cookies/cookie_store_ios_persistent.h b/ios/net/cookies/cookie_store_ios_persistent.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..63507610117eeb121768a6a02ee412cad01c0231 |
| --- /dev/null |
| +++ b/ios/net/cookies/cookie_store_ios_persistent.h |
| @@ -0,0 +1,83 @@ |
| +// Copyright 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_ |
| +#define IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_ |
| + |
| +#include "base/callback.h" |
| +#include "base/macros.h" |
| +#include "base/time/time.h" |
| +#include "ios/net/cookies/cookie_store_ios.h" |
|
Eugene But (OOO till 7-30)
2017/01/23 17:37:48
s/include/import
This is because cookie_store_ios
maksims (do not use this acc)
2017/01/24 10:23:46
Done.
|
| +#include "net/cookies/cookie_monster.h" |
| +#include "net/cookies/cookie_store.h" |
| +#include "url/gurl.h" |
| + |
| +@class NSHTTPCookieStorage; |
| + |
| +namespace net { |
| + |
| +// The CookieStoreIOSPersistent is an implementation of CookieStore relying on |
| +// on backing CookieStore. |
| +// CookieStoreIOSPersistent is not thread safe. |
| +// |
| +// All the changes are written back to the backing CookieStore. |
| +// For synchronized CookieStore, please see CookieStoreIOS. |
| +class CookieStoreIOSPersistent : public CookieStoreIOS { |
| + public: |
| + // Creates a CookieStoreIOS with a default value of |
| + // |NSHTTPCookieStorage sharedCookieStorage| as the system's cookie store. |
| + explicit CookieStoreIOSPersistent( |
| + net::CookieMonster::PersistentCookieStore* persistent_store); |
| + |
| + ~CookieStoreIOSPersistent() override; |
| + |
| + // Inherited CookieStore methods. |
| + void SetCookieWithOptionsAsync(const GURL& url, |
| + const std::string& cookie_line, |
| + const net::CookieOptions& options, |
| + const SetCookiesCallback& callback) override; |
| + void SetCookieWithDetailsAsync(const GURL& url, |
| + const std::string& name, |
| + const std::string& value, |
| + const std::string& domain, |
| + const std::string& path, |
| + base::Time creation_time, |
| + base::Time expiration_time, |
| + base::Time last_access_time, |
| + bool secure, |
| + bool http_only, |
| + CookieSameSite same_site, |
| + bool enforce_strict_secure, |
| + CookiePriority priority, |
| + const SetCookiesCallback& callback) override; |
| + void GetCookiesWithOptionsAsync(const GURL& url, |
| + const net::CookieOptions& options, |
| + const GetCookiesCallback& callback) override; |
| + void GetCookieListWithOptionsAsync( |
| + const GURL& url, |
| + const net::CookieOptions& options, |
| + const GetCookieListCallback& callback) override; |
| + void GetAllCookiesAsync(const GetCookieListCallback& callback) override; |
| + void DeleteCookieAsync(const GURL& url, |
| + const std::string& cookie_name, |
| + const base::Closure& callback) override; |
| + void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie, |
| + const DeleteCallback& callback) override; |
| + void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, |
| + const base::Time& delete_end, |
| + const DeleteCallback& callback) override; |
| + void DeleteAllCreatedBetweenWithPredicateAsync( |
| + const base::Time& delete_begin, |
| + const base::Time& delete_end, |
| + const CookiePredicate& predicate, |
| + const DeleteCallback& callback) override; |
| + void DeleteSessionCookiesAsync(const DeleteCallback& callback) override; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSPersistent); |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_PERSISTENT_H_ |