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

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

Issue 1177453003: Set the SRT prompt experiment to on by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/srt_field_trial_win.h" 5 #include "chrome/browser/safe_browsing/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/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "components/variations/variations_associated_data.h" 9 #include "components/variations/variations_associated_data.h"
10 10
11 namespace { 11 namespace {
12 12
13 // Field trial strings. 13 // Field trial strings.
14 const char kSRTCanaryGroupName[] = "SRTCanary"; 14 const char kSRTCanaryGroupName[] = "SRTCanary";
15 const char kSRTPromptTrialName[] = "SRTPromptFieldTrial"; 15 const char kSRTPromptTrialName[] = "SRTPromptFieldTrial";
16 const char kSRTPromptOnGroup[] = "On"; 16 const char kSRTPromptOffGroup[] = "Off";
17 const char kSRTPromptDefaultGroup[] = "Default";
18 const char kSRTPromptSeedParamName[] = "Seed"; 17 const char kSRTPromptSeedParamName[] = "Seed";
19 18
20 // The download links of the Software Removal Tool. 19 // The download links of the Software Removal Tool.
21 const char kMainSRTDownloadURL[] = 20 const char kMainSRTDownloadURL[] =
22 "http://dl.google.com/dl" 21 "http://dl.google.com/dl"
23 "/softwareremovaltool/win/software_removal_tool.exe?chrome-prompt=1"; 22 "/softwareremovaltool/win/software_removal_tool.exe?chrome-prompt=1";
24 const char kCanarySRTDownloadURL[] = 23 const char kCanarySRTDownloadURL[] =
25 "http://dl.google.com/dl" 24 "http://dl.google.com/dl"
26 "/softwareremovaltool/win/c/software_removal_tool.exe?chrome-prompt=1"; 25 "/softwareremovaltool/win/c/software_removal_tool.exe?chrome-prompt=1";
27 26
28 } // namespace 27 } // namespace
29 28
30 namespace safe_browsing { 29 namespace safe_browsing {
31 30
32 bool IsInSRTPromptFieldTrialGroups() { 31 bool IsInSRTPromptFieldTrialGroups() {
33 return base::FieldTrialList::FindFullName(kSRTPromptTrialName) != 32 return base::FieldTrialList::FindFullName(kSRTPromptTrialName) !=
34 kSRTPromptDefaultGroup; 33 kSRTPromptOffGroup;
35 } 34 }
36 35
37 const char* GetSRTDownloadURL() { 36 const char* GetSRTDownloadURL() {
38 if (base::FieldTrialList::FindFullName(kSRTPromptTrialName) == 37 if (base::FieldTrialList::FindFullName(kSRTPromptTrialName) ==
39 kSRTCanaryGroupName) 38 kSRTCanaryGroupName)
40 return kCanarySRTDownloadURL; 39 return kCanarySRTDownloadURL;
41 return kMainSRTDownloadURL; 40 return kMainSRTDownloadURL;
42 } 41 }
43 42
44 std::string GetIncomingSRTSeed() { 43 std::string GetIncomingSRTSeed() {
45 return variations::GetVariationParamValue(kSRTPromptTrialName, 44 return variations::GetVariationParamValue(kSRTPromptTrialName,
46 kSRTPromptSeedParamName); 45 kSRTPromptSeedParamName);
47 } 46 }
48 47
49 void RecordSRTPromptHistogram(SRTPromptHistogramValue value) { 48 void RecordSRTPromptHistogram(SRTPromptHistogramValue value) {
50 UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.PromptUsage", value, 49 UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.PromptUsage", value,
51 SRT_PROMPT_MAX); 50 SRT_PROMPT_MAX);
52 } 51 }
53 52
54 } // namespace safe_browsing 53 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698