OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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_CLIENT_H_ |
| 6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/sequenced_task_runner.h" |
| 11 |
| 12 namespace net { |
| 13 |
| 14 class CookieStoreIOSClient; |
| 15 |
| 16 // Setter and getter for the client. |
| 17 void SetCookieStoreIOSClient(CookieStoreIOSClient* client); |
| 18 CookieStoreIOSClient* GetCookieStoreIOSClient(); |
| 19 |
| 20 // Interface that the embedder of the net layer implements. This class lives on |
| 21 // the same thread as the CookieStoreIOS. |
| 22 class CookieStoreIOSClient { |
| 23 public: |
| 24 CookieStoreIOSClient(); |
| 25 virtual ~CookieStoreIOSClient(); |
| 26 |
| 27 // Gives the embedder a chance to perform tasks before the cookie storage is |
| 28 // changed. |
| 29 virtual void WillChangeCookieStorage() const; |
| 30 |
| 31 // Informs the embedder after the cookie storage has been changed. |
| 32 virtual void DidChangeCookieStorage() const; |
| 33 |
| 34 // Returns instance of SequencedTaskRunner used for blocking file I/O. |
| 35 virtual scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() const; |
| 36 |
| 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSClient); |
| 39 }; |
| 40 |
| 41 } // namespace net |
| 42 |
| 43 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_ |
OLD | NEW |