| 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_WEB_NET_COOKIE_NOTIFICATION_BRIDGE_H_ |
| 6 #define IOS_WEB_NET_COOKIE_NOTIFICATION_BRIDGE_H_ |
| 7 |
| 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/threading/thread_checker.h" |
| 10 |
| 11 namespace web { |
| 12 |
| 13 // CookieNotificationBridge listens to |
| 14 // NSHTTPCookieManagerCookiesChangedNotification on the main thread and re-sends |
| 15 // it to the cookie store on the IO thread. |
| 16 class CookieNotificationBridge { |
| 17 public: |
| 18 CookieNotificationBridge(); |
| 19 ~CookieNotificationBridge(); |
| 20 |
| 21 private: |
| 22 void OnNotificationReceived(NSNotification* notification); |
| 23 base::scoped_nsprotocol<id> observer_; |
| 24 base::ThreadChecker thread_checker_; |
| 25 |
| 26 DISALLOW_COPY_AND_ASSIGN(CookieNotificationBridge); |
| 27 }; |
| 28 |
| 29 } // namespace web |
| 30 |
| 31 #endif // IOS_WEB_NET_COOKIE_NOTIFICATION_BRIDGE_H_ |
| OLD | NEW |