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

Side by Side Diff: components/ntp_tiles/most_visited_sites.h

Issue 2126263002: Add NewTabPage.MostVisited and .SuggestionsImpression on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_provider_id
Patch Set: rebase Created 4 years, 5 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
« no previous file with comments | « no previous file | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698