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

Issue 2105933002: NTP: Fix metrics recording crash by plumbing the necessary data to Java. (Closed)

Created:
4 years, 5 months ago by dewittj
Modified:
4 years, 5 months ago
CC:
chromium-reviews, ntp-dev+reviews_chromium.org, sfiera
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

NTP: Fix metrics recording crash by plumbing the necessary data to Java. This has been broken since offline pages caused the refresh of the NTP MostVisitedSites to be asynchronous. BUG=612160 Committed: https://crrev.com/e14e21a2eb9ef970a6fc34f41290afe5e1015fc2 Cr-Commit-Position: refs/heads/master@{#405079}

Patch Set 1 #

Patch Set 2 : Add comments to prevent clang-format from reformatting the enum. #

Patch Set 3 : Fix test. #

Total comments: 23

Patch Set 4 : Move stats back into C++ #

Patch Set 5 : Remove unwanted changes. #

Patch Set 6 : Even more fixes. #

Total comments: 4

Patch Set 7 : Address treib@ comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -60 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java View 1 2 3 4 chunks +24 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java View 1 2 3 4 5 6 4 chunks +11 lines, -6 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java View 1 2 3 4 chunks +11 lines, -9 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/FakeMostVisitedSites.java View 1 2 3 4 5 4 chunks +9 lines, -3 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/android/ntp/most_visited_sites_bridge.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/android/ntp/most_visited_sites_bridge.cc View 1 2 3 3 chunks +22 lines, -3 lines 0 comments Download
M components/ntp_tiles.gypi View 1 chunk +1 line, -1 line 0 comments Download
M components/ntp_tiles/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M components/ntp_tiles/most_visited_sites.h View 1 2 3 4 5 6 2 chunks +34 lines, -2 lines 0 comments Download
M components/ntp_tiles/most_visited_sites.cc View 1 2 3 4 5 6 6 chunks +21 lines, -31 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (14 generated)
dewittj
I ran into this crash while testing today, so hoping to get the fix in ...
4 years, 5 months ago (2016-06-28 21:37:50 UTC) #2
Marc Treib
Thanks for taking this on! Some comments below. https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java (right): https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java#newcode70 chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java:70: * ...
4 years, 5 months ago (2016-06-29 08:19:32 UTC) #4
Bernhard Bauer
https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java (right): https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java#newcode556 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java:556: public static void recordTileTypeMetrics(MostVisitedItem[] items) { On 2016/06/29 08:19:31, ...
4 years, 5 months ago (2016-06-29 10:17:43 UTC) #5
Marc Treib
https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java (right): https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java#newcode556 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java:556: public static void recordTileTypeMetrics(MostVisitedItem[] items) { On 2016/06/29 10:17:43, ...
4 years, 5 months ago (2016-06-29 10:23:11 UTC) #6
dewittj
ptal https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java (right): https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java#newcode70 chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItem.java:70: * @param index The index of this item ...
4 years, 5 months ago (2016-06-30 17:48:54 UTC) #7
Marc Treib
LGTM, thanks! https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java (right): https://codereview.chromium.org/2105933002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java#newcode556 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java:556: public static void recordTileTypeMetrics(MostVisitedItem[] items) { On ...
4 years, 5 months ago (2016-07-01 10:01:04 UTC) #8
dewittj
https://codereview.chromium.org/2105933002/diff/100001/components/ntp_tiles/most_visited_sites.cc File components/ntp_tiles/most_visited_sites.cc (right): https://codereview.chromium.org/2105933002/diff/100001/components/ntp_tiles/most_visited_sites.cc#newcode272 components/ntp_tiles/most_visited_sites.cc:272: DCHECK_LT(index, static_cast<int>(current_suggestions_.size())); On 2016/07/01 10:01:04, Marc Treib wrote: > ...
4 years, 5 months ago (2016-07-01 21:35:21 UTC) #9
Bernhard Bauer
lgtm
4 years, 5 months ago (2016-07-04 12:49:56 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2105933002/120001
4 years, 5 months ago (2016-07-11 20:56:00 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/101648)
4 years, 5 months ago (2016-07-11 22:20:55 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2105933002/120001
4 years, 5 months ago (2016-07-12 11:12:13 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/191255)
4 years, 5 months ago (2016-07-12 15:16:31 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2105933002/120001
4 years, 5 months ago (2016-07-12 16:32:53 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/191549)
4 years, 5 months ago (2016-07-12 20:16:16 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2105933002/120001
4 years, 5 months ago (2016-07-12 21:55:39 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/261503)
4 years, 5 months ago (2016-07-13 00:47:44 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2105933002/120001
4 years, 5 months ago (2016-07-13 07:46:41 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 5 months ago (2016-07-13 08:25:54 UTC) #31
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-13 08:26:14 UTC) #32
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 08:27:25 UTC) #34
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e14e21a2eb9ef970a6fc34f41290afe5e1015fc2
Cr-Commit-Position: refs/heads/master@{#405079}

Powered by Google App Engine
This is Rietveld 408576698