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

Side by Side Diff: chrome/browser/android/ntp/most_visited_sites_bridge.cc

Issue 2429283003: Desktop NTP metrics: Use ntp_tiles::metrics:: functions (Closed)
Patch Set: review Created 4 years, 1 month 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 | chrome/browser/ui/webui/ntp/ntp_user_data_logger.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 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h" 5 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 ntp_tiles::metrics::RecordImpressionTileTypes(tile_types, sources); 228 ntp_tiles::metrics::RecordImpressionTileTypes(tile_types, sources);
229 } 229 }
230 230
231 void MostVisitedSitesBridge::RecordOpenedMostVisitedItem( 231 void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
232 JNIEnv* env, 232 JNIEnv* env,
233 const JavaParamRef<jobject>& obj, 233 const JavaParamRef<jobject>& obj,
234 jint index, 234 jint index,
235 jint tile_type, 235 jint tile_type,
236 jint source) { 236 jint source) {
237 ntp_tiles::metrics::RecordClick(index, 237 ntp_tiles::metrics::RecordTileClick(
238 static_cast<MostVisitedTileType>(tile_type), 238 index, static_cast<NTPTileSource>(source),
239 static_cast<NTPTileSource>(source)); 239 static_cast<MostVisitedTileType>(tile_type));
240 } 240 }
241 241
242 // static 242 // static
243 bool MostVisitedSitesBridge::Register(JNIEnv* env) { 243 bool MostVisitedSitesBridge::Register(JNIEnv* env) {
244 return RegisterNativesImpl(env); 244 return RegisterNativesImpl(env);
245 } 245 }
246 246
247 static jlong Init(JNIEnv* env, 247 static jlong Init(JNIEnv* env,
248 const JavaParamRef<jobject>& obj, 248 const JavaParamRef<jobject>& obj,
249 const JavaParamRef<jobject>& jprofile) { 249 const JavaParamRef<jobject>& jprofile) {
250 MostVisitedSitesBridge* most_visited_sites = 250 MostVisitedSitesBridge* most_visited_sites =
251 new MostVisitedSitesBridge( 251 new MostVisitedSitesBridge(
252 ProfileAndroid::FromProfileAndroid(jprofile)); 252 ProfileAndroid::FromProfileAndroid(jprofile));
253 return reinterpret_cast<intptr_t>(most_visited_sites); 253 return reinterpret_cast<intptr_t>(most_visited_sites);
254 } 254 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698