| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/net/cookies/cookie_store_ios.h" | 5 #include "ios/net/cookies/cookie_store_ios.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 void NotificationTrampoline::AddObserver(CookieNotificationObserver* obs) { | 81 void NotificationTrampoline::AddObserver(CookieNotificationObserver* obs) { |
| 82 observer_list_.AddObserver(obs); | 82 observer_list_.AddObserver(obs); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void NotificationTrampoline::RemoveObserver(CookieNotificationObserver* obs) { | 85 void NotificationTrampoline::RemoveObserver(CookieNotificationObserver* obs) { |
| 86 observer_list_.RemoveObserver(obs); | 86 observer_list_.RemoveObserver(obs); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void NotificationTrampoline::NotifyCookiesChanged() { | 89 void NotificationTrampoline::NotifyCookiesChanged() { |
| 90 FOR_EACH_OBSERVER(CookieNotificationObserver, observer_list_, | 90 for (auto& observer : observer_list_) |
| 91 OnSystemCookiesChanged()); | 91 observer.OnSystemCookiesChanged(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void NotificationTrampoline::NotifyCookiePolicyChanged() { | 94 void NotificationTrampoline::NotifyCookiePolicyChanged() { |
| 95 FOR_EACH_OBSERVER(CookieNotificationObserver, observer_list_, | 95 for (auto& observer : observer_list_) |
| 96 OnSystemCookiePolicyChanged()); | 96 observer.OnSystemCookiePolicyChanged(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 NotificationTrampoline::NotificationTrampoline() { | 99 NotificationTrampoline::NotificationTrampoline() { |
| 100 } | 100 } |
| 101 | 101 |
| 102 NotificationTrampoline::~NotificationTrampoline() { | 102 NotificationTrampoline::~NotificationTrampoline() { |
| 103 } | 103 } |
| 104 | 104 |
| 105 // Global instance of NotificationTrampoline. | 105 // Global instance of NotificationTrampoline. |
| 106 NotificationTrampoline* NotificationTrampoline::g_notification_trampoline = | 106 NotificationTrampoline* NotificationTrampoline::g_notification_trampoline = |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 weak_factory_.GetWeakPtr(), callback); | 1158 weak_factory_.GetWeakPtr(), callback); |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 base::Closure CookieStoreIOS::WrapClosure(const base::Closure& callback) { | 1161 base::Closure CookieStoreIOS::WrapClosure(const base::Closure& callback) { |
| 1162 DCHECK(thread_checker_.CalledOnValidThread()); | 1162 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1163 return base::Bind(&CookieStoreIOS::UpdateCachesAfterClosure, | 1163 return base::Bind(&CookieStoreIOS::UpdateCachesAfterClosure, |
| 1164 weak_factory_.GetWeakPtr(), callback); | 1164 weak_factory_.GetWeakPtr(), callback); |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 } // namespace net | 1167 } // namespace net |
| OLD | NEW |