Chromium Code Reviews| Index: chrome/browser/safe_browsing/srt_field_trial_win.cc |
| diff --git a/chrome/browser/safe_browsing/srt_field_trial_win.cc b/chrome/browser/safe_browsing/srt_field_trial_win.cc |
| index 249b274d3071dbd8622775728328a89dd3e494da..31015b6168c40e8c67e254a44e0d18c3adc631a8 100644 |
| --- a/chrome/browser/safe_browsing/srt_field_trial_win.cc |
| +++ b/chrome/browser/safe_browsing/srt_field_trial_win.cc |
| @@ -4,9 +4,12 @@ |
| #include "chrome/browser/safe_browsing/srt_field_trial_win.h" |
| +#include <sstream> |
|
grt (UTC plus 2)
2016/08/10 06:47:02
unused?
Joe Mason
2016/08/15 17:24:40
Done.
|
| + |
| #include "base/metrics/field_trial.h" |
| #include "base/metrics/histogram.h" |
| #include "base/strings/string_util.h" |
| +#include "base/strings/stringprintf.h" |
| #include "components/variations/variations_associated_data.h" |
| namespace { |
| @@ -23,6 +26,8 @@ const char kSRTElevationAsNeededGroup[] = "AsNeeded"; |
| const char kSRTReporterTrial[] = "srt_reporter"; |
| const char kSRTReporterOffGroup[] = "Off"; |
| +const char kSRTStepMetricName[] = "SoftwareReporter.Step"; |
| + |
| // The download links of the Software Removal Tool. |
| const char kMainSRTDownloadURL[] = |
| "https://dl.google.com/dl" |
| @@ -70,8 +75,15 @@ void RecordSRTPromptHistogram(SRTPromptHistogramValue value) { |
| SRT_PROMPT_MAX); |
| } |
| -void RecordReporterStepHistogram(SwReporterUmaValue value) { |
| - UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.Step", value, SW_REPORTER_MAX); |
| +void RecordReporterStepHistogram(SwReporterUmaValue value, |
| + const std::string& suffix) { |
| + if (suffix.empty()) { |
| + UMA_HISTOGRAM_ENUMERATION(kSRTStepMetricName, value, SW_REPORTER_MAX); |
| + return; |
| + } |
| + UMA_HISTOGRAM_ENUMERATION( |
| + base::StringPrintf("%s_%s", kSRTStepMetricName, suffix).c_str(), |
|
grt (UTC plus 2)
2016/08/10 06:47:02
due to the way the histogram macros work, you can'
Joe Mason
2016/08/15 17:24:40
Done. (Relies on the refactor to add UMAHistogramR
|
| + value, SW_REPORTER_MAX); |
| } |
| } // namespace safe_browsing |