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

Side by Side Diff: chrome/browser/history/top_sites.h

Issue 845013002: Remove TopSites notification in favor of Observers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_H_ 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_H_
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_ 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 // Remove Observer from the list. 177 // Remove Observer from the list.
178 void RemoveObserver(TopSitesObserver* observer); 178 void RemoveObserver(TopSitesObserver* observer);
179 179
180 protected: 180 protected:
181 void NotifyTopSitesLoaded(); 181 void NotifyTopSitesLoaded();
182 void NotifyTopSitesChanged(); 182 void NotifyTopSitesChanged();
183 ~TopSites() override; 183 ~TopSites() override;
184 184
185 private: 185 private:
186 ObserverList<TopSitesObserver> observer_list_; 186 ObserverList<TopSitesObserver, true> observer_list_;
187 friend class base::RefCountedThreadSafe<TopSites>; 187 friend class base::RefCountedThreadSafe<TopSites>;
188 }; 188 };
189 189
190 #if defined(OS_ANDROID) 190 #if defined(OS_ANDROID)
191 const int kPrepopulatedPagesCount = 0; 191 const int kPrepopulatedPagesCount = 0;
192 #else 192 #else
193 const int kPrepopulatedPagesCount = 2; 193 const int kPrepopulatedPagesCount = 2;
194 #endif 194 #endif
195 extern const TopSites::PrepopulatedPage 195 extern const TopSites::PrepopulatedPage
196 kPrepopulatedPages[kPrepopulatedPagesCount]; 196 kPrepopulatedPages[kPrepopulatedPagesCount];
197 197
198 } // namespace history 198 } // namespace history
199 199
200 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ 200 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/chrome_history_client_factory.cc ('k') | chrome/browser/history/top_sites_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698