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

Issue 137623002: Let MetricsService know about some Android Activities (Closed)

Created:
6 years, 11 months ago by Kibeom Kim (inactive)
Modified:
6 years, 7 months ago
CC:
chromium-reviews, jar (doing other things), asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Let MetricsService know about some Android Activities To tune our crash states more finely, we need to track which Activity is in the foreground when Chrome is killed. Add piping to let MetricsService know when Activities are swapped in and out by the user. The CL makes MetricsService track how many times particular Activities have been launched, as well as how often Chrome was improperly closed while one of these Activities was in the foreground (i.e. crashed). These numbers are concatenated into a histogram, which is then sent to the server. BUG=321346 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250410

Patch Set 1 : Dan's patch set 13 #

Patch Set 2 : addressed patch set 13's comments https://codereview.chromium.org/103943006/ #

Patch Set 3 : record stability histogram in MetricsService::PrepareInitialStabilityLog() #

Patch Set 4 : comment + flag change #

Patch Set 5 : revert 0 to Histogram::kNoFlags #

Total comments: 11

Patch Set 6 : addressed comments on patch set 5 + a unit test #

Total comments: 3

Patch Set 7 : removed unnecessary ConvertAndroidStabilityPrefsToHistograms() call and added missing OVERRIDE #

Total comments: 18

Patch Set 8 : rebase #

Patch Set 9 : addressed patchset 7's comments #

Total comments: 8

Patch Set 10 : addressed patch set 9's comments #

Total comments: 4

Patch Set 11 : Copyright 2013 -> 2014 #

Patch Set 12 : line warp fix #

Total comments: 30

Patch Set 13 : rebase #

Patch Set 14 : addressed patch set 12's comments except kUmaStabilityHistogramFlag issue #

Total comments: 2

Patch Set 15 : addressed patch set 14's comment #

Patch Set 16 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+486 lines, -21 lines) Patch
M base/base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M base/metrics/histogram.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +15 lines, -3 lines 0 comments Download
M base/metrics/histogram_base.h View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -6 lines 0 comments Download
M base/metrics/histogram_delta_serialization.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M base/metrics/histogram_snapshot_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -3 lines 0 comments Download
M base/metrics/histogram_snapshot_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -6 lines 0 comments Download
A base/metrics/histogram_snapshot_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +106 lines, -0 lines 0 comments Download
M base/metrics/statistics_recorder.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/java/ActivityTypeIds.template View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/browser/android/activity_type_id_list.h View 1 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/browser/android/activity_type_ids.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/browser/android/activity_type_ids.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_service.h View 1 2 3 4 5 4 chunks +21 lines, -1 line 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 2 3 4 5 6 5 chunks +19 lines, -0 lines 0 comments Download
A chrome/browser/metrics/metrics_service_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +143 lines, -0 lines 1 comment Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/common/metrics/metrics_service_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/metrics/metrics_service_base.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -1 line 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +23 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +24 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
Kibeom Kim (inactive)
6 years, 11 months ago (2014-01-16 00:19:01 UTC) #1
Kibeom Kim (inactive)
does this look right approach?
6 years, 11 months ago (2014-01-16 00:20:23 UTC) #2
Kibeom Kim (inactive)
asvitkine@ : ping (for just in case you missed)
6 years, 11 months ago (2014-01-21 22:52:15 UTC) #3
Alexei Svitkine (slow)
Sorry, I did indeed miss your mail - will take a look later today.
6 years, 11 months ago (2014-01-22 15:31:25 UTC) #4
Alexei Svitkine (slow)
Thanks for working on this! I think this is definitely going in the right direction, ...
6 years, 11 months ago (2014-01-22 21:14:18 UTC) #5
Kibeom Kim (inactive)
https://codereview.chromium.org/137623002/diff/440001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/137623002/diff/440001/base/metrics/histogram.h#newcode356 base/metrics/histogram.h:356: #define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \ On 2014/01/22 21:14:19, Alexei ...
6 years, 11 months ago (2014-01-24 19:45:03 UTC) #6
gone
https://codereview.chromium.org/137623002/diff/640001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (right): https://codereview.chromium.org/137623002/diff/640001/chrome/browser/metrics/metrics_service.cc#newcode1290 chrome/browser/metrics/metrics_service.cc:1290: ConvertAndroidStabilityPrefsToHistograms(pref); On 2014/01/24 19:45:09, Kibeom Kim wrote: > dfalcantara@ ...
6 years, 11 months ago (2014-01-24 20:03:02 UTC) #7
Kibeom Kim (inactive)
https://codereview.chromium.org/137623002/diff/640001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (right): https://codereview.chromium.org/137623002/diff/640001/chrome/browser/metrics/metrics_service.cc#newcode1290 chrome/browser/metrics/metrics_service.cc:1290: ConvertAndroidStabilityPrefsToHistograms(pref); On 2014/01/24 20:03:07, dfalcantara wrote: > On 2014/01/24 ...
6 years, 11 months ago (2014-01-24 23:21:34 UTC) #8
Alexei Svitkine (slow)
Looks really good. I still have some comments below, though. By the way, have you ...
6 years, 11 months ago (2014-01-27 19:12:53 UTC) #9
Kibeom Kim (inactive)
I manually tried it by force calling |MetricsService::PrepareInitialStabilityLog| inside |MetricsService::InitializeMetricsState| by setting the two conditional ...
6 years, 10 months ago (2014-01-29 01:52:31 UTC) #10
Alexei Svitkine (slow)
Looks really good, almost ready to land. Just a few more style comments below. https://codereview.chromium.org/137623002/diff/990001/base/metrics/histogram.h ...
6 years, 10 months ago (2014-01-29 16:54:09 UTC) #11
Kibeom Kim (inactive)
Adding other OWNERS (This CL is from https://codereview.chromium.org/103943006/ ) asvitkine: chrome/common/metrics/* tools/metrics/histograms/histograms.xml isherman: base/metrics/* chrome/browser/metrics/* ...
6 years, 10 months ago (2014-01-29 20:16:07 UTC) #12
Alexei Svitkine (slow)
LGTM, thanks! https://codereview.chromium.org/137623002/diff/1010001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/137623002/diff/1010001/base/metrics/histogram.h#newcode353 base/metrics/histogram.h:353: boundary + 1, flag)) Nit: boundary + ...
6 years, 10 months ago (2014-01-29 20:20:21 UTC) #13
Kibeom Kim (inactive)
https://codereview.chromium.org/137623002/diff/1010001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/137623002/diff/1010001/base/metrics/histogram.h#newcode353 base/metrics/histogram.h:353: boundary + 1, flag)) On 2014/01/29 20:20:21, Alexei Svitkine ...
6 years, 10 months ago (2014-01-29 20:25:15 UTC) #14
Yaron
android bits lgtm
6 years, 10 months ago (2014-01-29 20:43:25 UTC) #15
Nico
gyp changes lgtm
6 years, 10 months ago (2014-01-29 22:30:24 UTC) #16
Kibeom Kim (inactive)
isherman@ : ping?
6 years, 10 months ago (2014-02-05 18:49:04 UTC) #17
Ilya Sherman
On 2014/02/05 18:49:04, Kibeom Kim wrote: > isherman@ : ping? Sorry, still catching up from ...
6 years, 10 months ago (2014-02-07 02:55:08 UTC) #18
Ilya Sherman
LGTM, thanks :)
6 years, 10 months ago (2014-02-08 00:35:23 UTC) #19
Ilya Sherman
On 2014/02/08 00:35:23, Ilya Sherman (catching up...) wrote: > LGTM, thanks :) Wait, sorry, that ...
6 years, 10 months ago (2014-02-08 00:36:03 UTC) #20
Ilya Sherman
https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram.h#newcode350 base/metrics/histogram.h:350: #define UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \ Please drop the ...
6 years, 10 months ago (2014-02-08 00:59:48 UTC) #21
gone
https://codereview.chromium.org/137623002/diff/1040001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/137623002/diff/1040001/tools/metrics/histograms/histograms.xml#newcode1438 tools/metrics/histograms/histograms.xml:1438: + foreground when a UMA session was terminated abnormally. ...
6 years, 10 months ago (2014-02-08 01:16:32 UTC) #22
Ilya Sherman
https://codereview.chromium.org/137623002/diff/1040001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/137623002/diff/1040001/tools/metrics/histograms/histograms.xml#newcode1438 tools/metrics/histograms/histograms.xml:1438: + foreground when a UMA session was terminated abnormally. ...
6 years, 10 months ago (2014-02-08 01:18:44 UTC) #23
Kibeom Kim (inactive)
https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram.h#newcode350 base/metrics/histogram.h:350: #define UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \ On 2014/02/08 00:59:49, ...
6 years, 10 months ago (2014-02-10 22:24:44 UTC) #24
Alexei Svitkine (slow)
https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram_base.h File base/metrics/histogram_base.h (right): https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram_base.h#newcode66 base/metrics/histogram_base.h:66: kUmaStabilityHistogramFlag = kUmaTargetedHistogramFlag | 0x2, On 2014/02/10 22:24:45, Kibeom ...
6 years, 10 months ago (2014-02-10 22:48:22 UTC) #25
Ilya Sherman
https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram_base.h File base/metrics/histogram_base.h (right): https://codereview.chromium.org/137623002/diff/1040001/base/metrics/histogram_base.h#newcode66 base/metrics/histogram_base.h:66: kUmaStabilityHistogramFlag = kUmaTargetedHistogramFlag | 0x2, On 2014/02/10 22:48:23, Alexei ...
6 years, 10 months ago (2014-02-11 07:47:26 UTC) #26
Ilya Sherman
(Also, LGTM with those remaining comments addressed.)
6 years, 10 months ago (2014-02-11 07:47:50 UTC) #27
Kibeom Kim (inactive)
https://codereview.chromium.org/137623002/diff/1250001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/137623002/diff/1250001/base/metrics/histogram.h#newcode353 base/metrics/histogram.h:353: flag)) On 2014/02/11 07:47:27, Ilya Sherman (catching up...) wrote: ...
6 years, 10 months ago (2014-02-11 08:05:34 UTC) #28
Kibeom Kim (inactive)
The CQ bit was checked by kkimlabs@chromium.org
6 years, 10 months ago (2014-02-11 09:11:21 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkimlabs@chromium.org/137623002/1590001
6 years, 10 months ago (2014-02-11 09:11:59 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-11 10:14:21 UTC) #31
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) app_list_unittests, ash_unittests, aura_unittests, base_unittests, browser_tests, compositor_unittests, ...
6 years, 10 months ago (2014-02-11 10:14:23 UTC) #32
Kibeom Kim (inactive)
The CQ bit was checked by kkimlabs@chromium.org
6 years, 10 months ago (2014-02-11 10:20:41 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkimlabs@chromium.org/137623002/1590001
6 years, 10 months ago (2014-02-11 10:20:55 UTC) #34
commit-bot: I haz the power
Change committed as 250410
6 years, 10 months ago (2014-02-11 14:46:48 UTC) #35
Alexei Svitkine (slow)
https://codereview.chromium.org/137623002/diff/1590001/chrome/browser/metrics/metrics_service_android.cc File chrome/browser/metrics/metrics_service_android.cc (right): https://codereview.chromium.org/137623002/diff/1590001/chrome/browser/metrics/metrics_service_android.cc#newcode110 chrome/browser/metrics/metrics_service_android.cc:110: ActivityTypeIds::Type type) { Can you point me at the ...
6 years, 7 months ago (2014-05-21 08:21:13 UTC) #36
gone
6 years, 7 months ago (2014-05-21 16:45:55 UTC) #37
Message was sent while issue was closed.
On 2014/05/21 08:21:13, Alexei Svitkine wrote:
>
https://codereview.chromium.org/137623002/diff/1590001/chrome/browser/metrics...
> File chrome/browser/metrics/metrics_service_android.cc (right):
> 
>
https://codereview.chromium.org/137623002/diff/1590001/chrome/browser/metrics...
> chrome/browser/metrics/metrics_service_android.cc:110: ActivityTypeIds::Type
> type) {
> Can you point me at the code from the Android side that actually calls this?
> 
> I couldn't find any callers of this - for example it doesn't seem to be called
> from uma_session_stats.cc.
> 
> (We're in the middle of refactoring MetricsService now to make it a component
> and I'm hoping to not break this code in the process.)

Got pulled away from landing the Android-side because the Chromium-side took so
long to land.  The CL that would have gone in is
https://chrome-internal-review.googlesource.com/#/c/149216/, but with the
Samsung multi-window mode changes it has to be rewritten. 

If you break this code, I'll fix it when I find the opportunity to work on the
Android side of things again.

Powered by Google App Engine
This is Rietveld 408576698