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

Issue 2528033003: MetricsService: ensure in-memory/pref execution phase are in sync (Closed)

Created:
4 years ago by manzagop (departed)
Modified:
4 years ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MetricsService: ensure in-memory/pref execution phase are in sync Background: MetricsService contains an |execution_phase_| which is mirrored to prefs::kStabilityExecutionPhase. In some cases, the mirroring doesn't happen. - Mobile In OnAppEnterBackground we call MarkAppCleanShutdownAndCommit which stores SHUTDOWN_COMPLETE to the pref but leaves |execution_phase_| unchanged. That seems ok. However, we restore the pref back to |execution_phase_| in OnAppEnterForeground. This CL does so. - LogCleanShutdown Now also updates MetricsService::execution_phase_ (in addition to the pref) by calling MetricsService::SetExecutionPhase - ClearSavedStabilityMetrics now sets the pref to |execution_phase_| instead of UNINITIALIZED_PHASE. It equivalent right now, but it seems more correct. BUG=668542 Committed: https://crrev.com/7c14de297e7610734444f2bbc99141810e8e7b44 Cr-Commit-Position: refs/heads/master@{#434518}

Patch Set 1 #

Patch Set 2 : Add metric owner #

Total comments: 4

Patch Set 3 : Address comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -12 lines) Patch
M components/metrics/metrics_service.cc View 1 2 6 chunks +12 lines, -11 lines 1 comment Download
M tools/metrics/histograms/histograms.xml View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 32 (25 generated)
manzagop (departed)
Hi Alexei! This should mostly make a difference on mobile. Right now the execution phase ...
4 years ago (2016-11-24 20:54:22 UTC) #10
Alexei Svitkine (slow)
https://codereview.chromium.org/2528033003/diff/40001/components/metrics/metrics_service.cc File components/metrics/metrics_service.cc (right): https://codereview.chromium.org/2528033003/diff/40001/components/metrics/metrics_service.cc#newcode484 components/metrics/metrics_service.cc:484: // Restore the execution phase stored in prefs. Nit: ...
4 years ago (2016-11-24 21:20:20 UTC) #15
manzagop (departed)
Thanks! Another look? https://codereview.chromium.org/2528033003/diff/40001/components/metrics/metrics_service.cc File components/metrics/metrics_service.cc (right): https://codereview.chromium.org/2528033003/diff/40001/components/metrics/metrics_service.cc#newcode484 components/metrics/metrics_service.cc:484: // Restore the execution phase stored ...
4 years ago (2016-11-24 22:40:42 UTC) #21
Alexei Svitkine (slow)
lgtm
4 years ago (2016-11-24 22:49:19 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/2528033003/100001
4 years ago (2016-11-25 15:24:49 UTC) #27
commit-bot: I haz the power
Committed patchset #3 (id:100001)
4 years ago (2016-11-25 16:20:01 UTC) #30
commit-bot: I haz the power
4 years ago (2016-11-25 16:22:17 UTC) #32
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/7c14de297e7610734444f2bbc99141810e8e7b44
Cr-Commit-Position: refs/heads/master@{#434518}

Powered by Google App Engine
This is Rietveld 408576698