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 COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 5 #ifndef COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ |
6 #define COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 6 #define COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 SuggestionsVector popular_suggestions); | 222 SuggestionsVector popular_suggestions); |
223 | 223 |
224 void SaveCurrentSuggestionsToPrefs(); | 224 void SaveCurrentSuggestionsToPrefs(); |
225 | 225 |
226 // Notifies the observer about the availability of suggestions. | 226 // Notifies the observer about the availability of suggestions. |
227 // Also records impressions UMA if not done already. | 227 // Also records impressions UMA if not done already. |
228 void NotifyMostVisitedURLsObserver(); | 228 void NotifyMostVisitedURLsObserver(); |
229 | 229 |
230 void OnPopularSitesAvailable(bool success); | 230 void OnPopularSitesAvailable(bool success); |
231 | 231 |
232 // Records thumbnail-related UMA histogram metrics. | |
233 void RecordThumbnailUMAMetrics(); | |
234 | |
235 // Records UMA histogram metrics related to the number of impressions. | 232 // Records UMA histogram metrics related to the number of impressions. |
236 void RecordImpressionUMAMetrics(); | 233 void RecordImpressionUMAMetrics(); |
237 | 234 |
238 // history::TopSitesObserver implementation. | 235 // history::TopSitesObserver implementation. |
239 void TopSitesLoaded(history::TopSites* top_sites) override; | 236 void TopSitesLoaded(history::TopSites* top_sites) override; |
240 void TopSitesChanged(history::TopSites* top_sites, | 237 void TopSitesChanged(history::TopSites* top_sites, |
241 ChangeReason change_reason) override; | 238 ChangeReason change_reason) override; |
242 | 239 |
243 PrefService* prefs_; | 240 PrefService* prefs_; |
244 const TemplateURLService* template_url_service_; | 241 const TemplateURLService* template_url_service_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 281 |
285 // For callbacks may be run after destruction. | 282 // For callbacks may be run after destruction. |
286 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 283 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; |
287 | 284 |
288 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 285 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); |
289 }; | 286 }; |
290 | 287 |
291 } // namespace ntp_tiles | 288 } // namespace ntp_tiles |
292 | 289 |
293 #endif // COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 290 #endif // COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ |
OLD | NEW |