Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ios / chrome / browser / net / chrome_cookie_store_ios_client.h
blob54ed312c4d917cf6e2a86d4fea75397da52fab0c
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_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_
6 #define IOS_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_
8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h"
10 #include "ios/net/cookies/cookie_store_ios_client.h"
12 @protocol BrowsingDataChangeListening;
14 // Chrome implementation of net::CookieStoreIOSClient. This class lives on the
15 // IOThread.
16 class ChromeCookieStoreIOSClient : public net::CookieStoreIOSClient {
17 public:
18 // Creates a CookieStoreIOSClient with a BrowsingDataChangeListening.
19 // |browsing_data_change_listener| cannot be nil.
20 explicit ChromeCookieStoreIOSClient(
21 id<BrowsingDataChangeListening> browsing_data_change_listener);
23 // CookieStoreIOSClient implementation.
24 void DidChangeCookieStorage() const override;
25 scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() const override;
27 private:
28 base::ThreadChecker thread_checker_;
29 // The listener that is informed of change in browsing data.
30 id<BrowsingDataChangeListening> browsing_data_change_listener_; // Weak.
31 DISALLOW_COPY_AND_ASSIGN(ChromeCookieStoreIOSClient);
34 #endif // IOS_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_