Fix breakages in https://codereview.chromium.org/1155713003/
[chromium-blink-merge.git] / ios / web / net / cookie_notification_bridge.h
blobc255faa0881bf7df5a69a2aef40f303f3e19b44c
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_WEB_NET_COOKIE_NOTIFICATION_BRIDGE_H_
6 #define IOS_WEB_NET_COOKIE_NOTIFICATION_BRIDGE_H_
8 #include "base/mac/scoped_nsobject.h"
9 #include "base/threading/thread_checker.h"
11 @class NSNotification;
13 namespace web {
15 // CookieNotificationBridge listens to
16 // NSHTTPCookieManagerCookiesChangedNotification on the main thread and re-sends
17 // it to the cookie store on the IO thread.
18 class CookieNotificationBridge {
19 public:
20 CookieNotificationBridge();
21 ~CookieNotificationBridge();
23 private:
24 void OnNotificationReceived(NSNotification* notification);
25 base::scoped_nsprotocol<id> observer_;
26 base::ThreadChecker thread_checker_;
28 DISALLOW_COPY_AND_ASSIGN(CookieNotificationBridge);
31 } // namespace web
33 #endif // IOS_WEB_NET_COOKIE_NOTIFICATION_BRIDGE_H_