| OLD | NEW |
| 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 <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class CookieStoreIOS : public net::CookieStore, | 51 class CookieStoreIOS : public net::CookieStore, |
| 52 public CookieNotificationObserver { | 52 public CookieNotificationObserver { |
| 53 public: | 53 public: |
| 54 // Creates an instance of CookieStoreIOS that is generated from the cookies | 54 // Creates an instance of CookieStoreIOS that is generated from the cookies |
| 55 // stored in |cookie_storage|. The CookieStoreIOS uses the |cookie_storage| | 55 // stored in |cookie_storage|. The CookieStoreIOS uses the |cookie_storage| |
| 56 // as its default backend and is initially synchronized with it. | 56 // as its default backend and is initially synchronized with it. |
| 57 // Apple does not persist the cookies' creation dates in NSHTTPCookieStorage, | 57 // Apple does not persist the cookies' creation dates in NSHTTPCookieStorage, |
| 58 // so callers should not expect these values to be populated. | 58 // so callers should not expect these values to be populated. |
| 59 explicit CookieStoreIOS(NSHTTPCookieStorage* cookie_storage); | 59 explicit CookieStoreIOS(NSHTTPCookieStorage* cookie_storage); |
| 60 | 60 |
| 61 // Creates a CookieStoreIOS with NSHTTPCookieStorage backend. | |
| 62 // TODO(crbug.com/683964): Remove this method. | |
| 63 static std::unique_ptr<CookieStoreIOS> CreateCookieStore( | |
| 64 NSHTTPCookieStorage* cookie_storage); | |
| 65 | |
| 66 ~CookieStoreIOS() override; | 61 ~CookieStoreIOS() override; |
| 67 | 62 |
| 68 enum CookiePolicy { ALLOW, BLOCK }; | 63 enum CookiePolicy { ALLOW, BLOCK }; |
| 69 | 64 |
| 70 // Must be called when the state of | 65 // Must be called when the state of |
| 71 // |NSHTTPCookieStorage sharedHTTPCookieStorage| changes. | 66 // |NSHTTPCookieStorage sharedHTTPCookieStorage| changes. |
| 72 // Affects only those CookieStoreIOS instances that are backed by | 67 // Affects only those CookieStoreIOS instances that are backed by |
| 73 // |NSHTTPCookieStorage sharedHTTPCookieStorage|. | 68 // |NSHTTPCookieStorage sharedHTTPCookieStorage|. |
| 74 static void NotifySystemCookiesChanged(); | 69 static void NotifySystemCookiesChanged(); |
| 75 | 70 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 hook_map_; | 269 hook_map_; |
| 275 | 270 |
| 276 base::WeakPtrFactory<CookieStoreIOS> weak_factory_; | 271 base::WeakPtrFactory<CookieStoreIOS> weak_factory_; |
| 277 | 272 |
| 278 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOS); | 273 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOS); |
| 279 }; | 274 }; |
| 280 | 275 |
| 281 } // namespace net | 276 } // namespace net |
| 282 | 277 |
| 283 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ | 278 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ |
| OLD | NEW |