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 "base/metrics/field_trial.h"
6 #include "components/variations/variations_associated_data.h"
10 // Field trial strings.
11 const char kSRTCanaryGroupName
[] = "SRTCanary";
12 const char kSRTPromptTrialName
[] = "SRTPromptFieldTrial";
13 const char kSRTPromptOnGroup
[] = "On";
14 const char kSRTPromptSeedParamName
[] = "Seed";
16 // The download links of the Software Removal Tool.
17 const char kMainSRTDownloadURL
[] =
18 "http://dl.google.com/dl"
19 "/softwareremovaltool/win/software_removal_tool.exe?chrome-prompt=1";
20 const char kCanarySRTDownloadURL
[] =
21 "http://dl.google.com/dl"
22 "/softwareremovaltool/win/c/software_removal_tool.exe?chrome-prompt=1";
26 namespace safe_browsing
{
28 bool IsInSRTPromptFieldTrialGroups() {
29 return base::FieldTrialList::FindFullName(kSRTPromptTrialName
) ==
33 const char* GetSRTDownloadURL() {
34 if (base::FieldTrialList::FindFullName(kSRTPromptTrialName
) ==
36 return kCanarySRTDownloadURL
;
37 return kMainSRTDownloadURL
;
40 std::string
GetIncomingSRTSeed() {
41 return variations::GetVariationParamValue(kSRTPromptTrialName
,
42 kSRTPromptSeedParamName
);
45 } // namespace safe_browsing