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 #include "ios/web/net/cookie_notification_bridge.h" | 5 #import "ios/web/net/cookie_notification_bridge.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "ios/net/cookies/cookie_store_ios.h" | 11 #import "ios/net/cookies/cookie_store_ios.h" |
12 #include "ios/web/public/web_thread.h" | 12 #include "ios/web/public/web_thread.h" |
13 | 13 |
14 #if !defined(__has_feature) || !__has_feature(objc_arc) | 14 #if !defined(__has_feature) || !__has_feature(objc_arc) |
15 #error "This file requires ARC support." | 15 #error "This file requires ARC support." |
16 #endif | 16 #endif |
17 | 17 |
18 namespace web { | 18 namespace web { |
19 | 19 |
20 CookieNotificationBridge::CookieNotificationBridge() { | 20 CookieNotificationBridge::CookieNotificationBridge() { |
21 id<NSObject> observer = [[NSNotificationCenter defaultCenter] | 21 id<NSObject> observer = [[NSNotificationCenter defaultCenter] |
(...skipping 14 matching lines...) Expand all Loading... |
36 NSNotification* notification) { | 36 NSNotification* notification) { |
37 DCHECK(thread_checker_.CalledOnValidThread()); | 37 DCHECK(thread_checker_.CalledOnValidThread()); |
38 DCHECK([[notification name] | 38 DCHECK([[notification name] |
39 isEqualToString:NSHTTPCookieManagerCookiesChangedNotification]); | 39 isEqualToString:NSHTTPCookieManagerCookiesChangedNotification]); |
40 web::WebThread::PostTask( | 40 web::WebThread::PostTask( |
41 web::WebThread::IO, FROM_HERE, | 41 web::WebThread::IO, FROM_HERE, |
42 base::Bind(&net::CookieStoreIOS::NotifySystemCookiesChanged)); | 42 base::Bind(&net::CookieStoreIOS::NotifySystemCookiesChanged)); |
43 } | 43 } |
44 | 44 |
45 } // namespace web | 45 } // namespace web |
OLD | NEW |