Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: ios/net/cookies/cookie_store_ios.mm

Issue 2420013005: Remove usage of FOR_EACH_OBSERVER macro in ios/ (Closed)
Patch Set: typo Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698