| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ |
| 6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ | 6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void RecordImpressionUMAMetrics(); | 205 void RecordImpressionUMAMetrics(); |
| 206 | 206 |
| 207 // history::TopSitesObserver implementation. | 207 // history::TopSitesObserver implementation. |
| 208 void TopSitesLoaded(history::TopSites* top_sites) override; | 208 void TopSitesLoaded(history::TopSites* top_sites) override; |
| 209 void TopSitesChanged(history::TopSites* top_sites, | 209 void TopSitesChanged(history::TopSites* top_sites, |
| 210 ChangeReason change_reason) override; | 210 ChangeReason change_reason) override; |
| 211 | 211 |
| 212 // The profile whose most visited sites will be queried. | 212 // The profile whose most visited sites will be queried. |
| 213 Profile* profile_; | 213 Profile* profile_; |
| 214 | 214 |
| 215 scoped_refptr<history::TopSites> top_sites_; |
| 216 suggestions::SuggestionsService* suggestions_service_; |
| 217 |
| 215 Observer* observer_; | 218 Observer* observer_; |
| 216 | 219 |
| 217 // The maximum number of most visited sites to return. | 220 // The maximum number of most visited sites to return. |
| 218 int num_sites_; | 221 int num_sites_; |
| 219 | 222 |
| 220 // Whether we have received an initial set of most visited sites (from either | 223 // Whether we have received an initial set of most visited sites (from either |
| 221 // TopSites or the SuggestionsService). | 224 // TopSites or the SuggestionsService). |
| 222 bool received_most_visited_sites_; | 225 bool received_most_visited_sites_; |
| 223 | 226 |
| 224 // Whether we have received the set of popular sites. Immediately set to true | 227 // Whether we have received the set of popular sites. Immediately set to true |
| (...skipping 16 matching lines...) Expand all Loading... |
| 241 | 244 |
| 242 SuggestionsVector current_suggestions_; | 245 SuggestionsVector current_suggestions_; |
| 243 | 246 |
| 244 // For callbacks may be run after destruction. | 247 // For callbacks may be run after destruction. |
| 245 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 248 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; |
| 246 | 249 |
| 247 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 250 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); |
| 248 }; | 251 }; |
| 249 | 252 |
| 250 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ | 253 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ |
| OLD | NEW |