OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_ | 5 #ifndef IOS_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_ |
6 #define IOS_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_ | 6 #define IOS_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/sequenced_task_runner.h" |
9 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
10 #include "ios/net/cookies/cookie_store_ios_client.h" | 11 #include "ios/net/cookies/cookie_store_ios_client.h" |
11 | 12 |
12 @protocol BrowsingDataChangeListening; | 13 @protocol BrowsingDataChangeListening; |
13 | 14 |
14 // Chrome implementation of net::CookieStoreIOSClient. This class lives on the | 15 // Chrome implementation of net::CookieStoreIOSClient. This class lives on the |
15 // IOThread. | 16 // IOThread. |
16 class ChromeCookieStoreIOSClient : public net::CookieStoreIOSClient { | 17 class ChromeCookieStoreIOSClient : public net::CookieStoreIOSClient { |
17 public: | 18 public: |
18 // Creates a CookieStoreIOSClient with a BrowsingDataChangeListening. | 19 // Creates a CookieStoreIOSClient with a BrowsingDataChangeListening. |
19 // |browsing_data_change_listener| cannot be nil. | 20 // |browsing_data_change_listener| cannot be nil. |
20 explicit ChromeCookieStoreIOSClient( | 21 explicit ChromeCookieStoreIOSClient( |
21 id<BrowsingDataChangeListening> browsing_data_change_listener); | 22 id<BrowsingDataChangeListening> browsing_data_change_listener); |
22 | 23 |
23 // CookieStoreIOSClient implementation. | 24 // CookieStoreIOSClient implementation. |
24 void DidChangeCookieStorage() const override; | 25 void DidChangeCookieStorage() const override; |
25 scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() const override; | 26 scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() const override; |
26 | 27 |
27 private: | 28 private: |
28 base::ThreadChecker thread_checker_; | 29 base::ThreadChecker thread_checker_; |
29 // The listener that is informed of change in browsing data. | 30 // The listener that is informed of change in browsing data. |
30 id<BrowsingDataChangeListening> browsing_data_change_listener_; // Weak. | 31 id<BrowsingDataChangeListening> browsing_data_change_listener_; // Weak. |
31 DISALLOW_COPY_AND_ASSIGN(ChromeCookieStoreIOSClient); | 32 DISALLOW_COPY_AND_ASSIGN(ChromeCookieStoreIOSClient); |
32 }; | 33 }; |
33 | 34 |
34 #endif // IOS_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_ | 35 #endif // IOS_CHROME_BROWSER_NET_CHROME_COOKIE_STORE_IOS_CLIENT_H_ |
OLD | NEW |