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

Side by Side Diff: chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.cc

Issue 2973873002: Primary histograms for InBrowserCleanerUI experiment (Closed)
Patch Set: Revert changes to histogram.cc Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" 5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/metrics/field_trial_params.h" 8 #include "base/metrics/field_trial_params.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 19 matching lines...) Expand all
30 "https://dl.google.com/dl/softwareremovaltool/win/"; 30 "https://dl.google.com/dl/softwareremovaltool/win/";
31 31
32 // The download links of the Software Removal Tool. 32 // The download links of the Software Removal Tool.
33 const char kMainSRTDownloadURL[] = 33 const char kMainSRTDownloadURL[] =
34 "https://dl.google.com/dl" 34 "https://dl.google.com/dl"
35 "/softwareremovaltool/win/chrome_cleanup_tool.exe?chrome-prompt=1"; 35 "/softwareremovaltool/win/chrome_cleanup_tool.exe?chrome-prompt=1";
36 const char kCanarySRTDownloadURL[] = 36 const char kCanarySRTDownloadURL[] =
37 "https://dl.google.com/dl" 37 "https://dl.google.com/dl"
38 "/softwareremovaltool/win/c/chrome_cleanup_tool.exe?chrome-prompt=1"; 38 "/softwareremovaltool/win/c/chrome_cleanup_tool.exe?chrome-prompt=1";
39 39
40 constexpr char kSoftwareReporterPromptShownMetricName[] =
41 "SoftwareReporter.PromptShown";
42
40 } // namespace 43 } // namespace
41 44
42 namespace safe_browsing { 45 namespace safe_browsing {
43 46
44 const base::Feature kInBrowserCleanerUIFeature{ 47 const base::Feature kInBrowserCleanerUIFeature{
45 "InBrowserCleanerUI", base::FEATURE_DISABLED_BY_DEFAULT}; 48 "InBrowserCleanerUI", base::FEATURE_DISABLED_BY_DEFAULT};
46 49
47 const base::Feature kCleanerDownloadFeature{"DownloadCleanupToolByBitness", 50 const base::Feature kCleanerDownloadFeature{"DownloadCleanupToolByBitness",
48 base::FEATURE_DISABLED_BY_DEFAULT}; 51 base::FEATURE_DISABLED_BY_DEFAULT};
49 52
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 std::string GetIncomingSRTSeed() { 107 std::string GetIncomingSRTSeed() {
105 return variations::GetVariationParamValue(kSRTPromptTrial, 108 return variations::GetVariationParamValue(kSRTPromptTrial,
106 kSRTPromptSeedParam); 109 kSRTPromptSeedParam);
107 } 110 }
108 111
109 void RecordSRTPromptHistogram(SRTPromptHistogramValue value) { 112 void RecordSRTPromptHistogram(SRTPromptHistogramValue value) {
110 UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.PromptUsage", value, 113 UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.PromptUsage", value,
111 SRT_PROMPT_MAX); 114 SRT_PROMPT_MAX);
112 } 115 }
113 116
117 void RecordPromptShownHistogram() {
118 UMA_HISTOGRAM_BOOLEAN(kSoftwareReporterPromptShownMetricName, true);
119 }
120
121 void RecordPromptNotShownWithReasonHistogram(
122 NoPromptReasonHistogramValue value) {
123 UMA_HISTOGRAM_BOOLEAN(kSoftwareReporterPromptShownMetricName, false);
124 UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.NoPromptReason", value,
125 NO_PROMPT_REASON_MAX);
126 }
127
114 } // namespace safe_browsing 128 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698