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

Unified Diff: chrome/browser/android/ntp/ntp_snippets_bridge.cc

Issue 2627603002: [NTP::SectionOrder] Propagate category rank from UI through the bridge. (Closed)
Patch Set: java tests. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/ntp_snippets_bridge.cc
diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
index 97be38154d267c14948eaaffedf539a497bec5c2..b14fe587e53a3f1cd580384b2d495f9832cd272a 100644
--- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc
+++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
@@ -347,10 +347,12 @@ void NTPSnippetsBridge::OnSuggestionOpened(JNIEnv* env,
const JavaParamRef<jobject>& obj,
jint global_position,
jint j_category_id,
+ jint category_rank,
jint category_position,
jlong publish_timestamp_ms,
jfloat score,
int windowOpenDisposition) {
+ DCHECK_GT(category_rank, 0);
Marc Treib 2017/01/16 11:23:05 Is this 1-based?!
vitaliii 2017/01/16 11:36:17 Yes, is this unusual? It is not called "index". I
Marc Treib 2017/01/16 12:28:52 Well, most things we deal with are 0-based, includ
vitaliii 2017/01/16 12:48:37 I like the consistency. However, I do not want to
tschumann 2017/01/16 13:45:41 +mastiz: What's the usual way ranks get handled in
mastiz 2017/01/16 15:22:53 The term 'rank' suggests 1-based, otherwise logs u
ntp_snippets::metrics::OnSuggestionOpened(
global_position, Category::FromIDValue(j_category_id), category_position,
base::Time::FromJavaTime(publish_timestamp_ms), score,
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698