Commit 64263b57 authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

More simplification in service worker metrics

- Use the helpers in histogram_functions.h instead of using custom
  versions.
- Use kMaxValue version of UMA_HISTOGRAM_ENUM in one more place
- Return const char* for enum stringification helpers to reduce number
  of temporary strings.
- Use StrCat() to build dynamic histogram names to reduce number of
  temporary strings.

  Bug: none

Change-Id: I720d11ad16c245f3ea59d55c2b75af8914eea7e8
Reviewed-on: https://chromium-review.googlesource.com/1174014
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582877}
parent efb957f2
...@@ -39,7 +39,7 @@ enum class StartServiceWorkerForNavigationHintResult { ...@@ -39,7 +39,7 @@ enum class StartServiceWorkerForNavigationHintResult {
// Something failed. // Something failed.
FAILED = 5, FAILED = 5,
// Add new result to record here. // Add new result to record here.
NUM_TYPES kMaxValue = FAILED,
}; };
// Represents the per-StoragePartition service worker data. // Represents the per-StoragePartition service worker data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment