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

Side by Side Diff: components/history/core/browser/top_sites.cc

Issue 2423813002: Remove usage of FOR_EACH_OBSERVER macro in components/history (Closed)
Patch Set: explicit type 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "components/history/core/browser/top_sites.h" 5 #include "components/history/core/browser/top_sites.h"
6 6
7 #include "components/history/core/browser/top_sites_observer.h" 7 #include "components/history/core/browser/top_sites_observer.h"
8 8
9 namespace history { 9 namespace history {
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 void TopSites::AddObserver(TopSitesObserver* observer) { 33 void TopSites::AddObserver(TopSitesObserver* observer) {
34 observer_list_.AddObserver(observer); 34 observer_list_.AddObserver(observer);
35 } 35 }
36 36
37 void TopSites::RemoveObserver(TopSitesObserver* observer) { 37 void TopSites::RemoveObserver(TopSitesObserver* observer) {
38 observer_list_.RemoveObserver(observer); 38 observer_list_.RemoveObserver(observer);
39 } 39 }
40 40
41 void TopSites::NotifyTopSitesLoaded() { 41 void TopSites::NotifyTopSitesLoaded() {
42 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesLoaded(this)); 42 for (TopSitesObserver& observer : observer_list_)
43 observer.TopSitesLoaded(this);
43 } 44 }
44 45
45 void TopSites::NotifyTopSitesChanged( 46 void TopSites::NotifyTopSitesChanged(
46 const TopSitesObserver::ChangeReason reason) { 47 const TopSitesObserver::ChangeReason reason) {
47 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, 48 for (TopSitesObserver& observer : observer_list_)
48 TopSitesChanged(this, reason)); 49 observer.TopSitesChanged(this, reason);
49 } 50 }
50 51
51 } // namespace history 52 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/history_service.cc ('k') | components/history/core/browser/web_history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698