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.
5 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_
6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/sequenced_task_runner.h"
14 class CookieStoreIOSClient
;
16 // Setter and getter for the client.
17 void SetCookieStoreIOSClient(CookieStoreIOSClient
* client
);
18 CookieStoreIOSClient
* GetCookieStoreIOSClient();
20 // Interface that the embedder of the net layer implements. This class lives on
21 // the same thread as the CookieStoreIOS.
22 class CookieStoreIOSClient
{
24 CookieStoreIOSClient();
25 virtual ~CookieStoreIOSClient();
27 // Gives the embedder a chance to perform tasks before the cookie storage is
29 virtual void WillChangeCookieStorage() const;
31 // Informs the embedder after the cookie storage has been changed.
32 virtual void DidChangeCookieStorage() const;
34 // Returns instance of SequencedTaskRunner used for blocking file I/O.
35 virtual scoped_refptr
<base::SequencedTaskRunner
> GetTaskRunner() const;
38 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSClient
);
43 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_