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
3 // found in the LICENSE file.
5 #include "chrome/browser/safe_browsing/srt_field_trial_win.h"
7 #include "base/metrics/field_trial.h"
8 #include "components/variations/variations_associated_data.h"
12 // Field trial strings.
13 const char kSRTCanaryGroupName
[] = "SRTCanary";
14 const char kSRTPromptTrialName
[] = "SRTPromptFieldTrial";
15 const char kSRTPromptOnGroup
[] = "On";
16 const char kSRTPromptDefaultGroup
[] = "Default";
17 const char kSRTPromptSeedParamName
[] = "Seed";
19 // The download links of the Software Removal Tool.
20 const char kMainSRTDownloadURL
[] =
21 "http://dl.google.com/dl"
22 "/softwareremovaltool/win/software_removal_tool.exe?chrome-prompt=1";
23 const char kCanarySRTDownloadURL
[] =
24 "http://dl.google.com/dl"
25 "/softwareremovaltool/win/c/software_removal_tool.exe?chrome-prompt=1";
29 namespace safe_browsing
{
31 bool IsInSRTPromptFieldTrialGroups() {
32 return base::FieldTrialList::FindFullName(kSRTPromptTrialName
) !=
33 kSRTPromptDefaultGroup
;
36 const char* GetSRTDownloadURL() {
37 if (base::FieldTrialList::FindFullName(kSRTPromptTrialName
) ==
39 return kCanarySRTDownloadURL
;
40 return kMainSRTDownloadURL
;
43 std::string
GetIncomingSRTSeed() {
44 return variations::GetVariationParamValue(kSRTPromptTrialName
,
45 kSRTPromptSeedParamName
);
48 } // namespace safe_browsing