Add domain request detection to incident reporting service.
[chromium-blink-merge.git] / chrome / browser / safe_browsing / srt_field_trial_win.cc
blob23abfc590f6706be53414834d99ee1458664e68c
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"
8 namespace {
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";
24 } // namespace
26 namespace safe_browsing {
28 bool IsInSRTPromptFieldTrialGroups() {
29 return base::FieldTrialList::FindFullName(kSRTPromptTrialName) ==
30 kSRTPromptOnGroup;
33 const char* GetSRTDownloadURL() {
34 if (base::FieldTrialList::FindFullName(kSRTPromptTrialName) ==
35 kSRTCanaryGroupName)
36 return kCanarySRTDownloadURL;
37 return kMainSRTDownloadURL;
40 std::string GetIncomingSRTSeed() {
41 return variations::GetVariationParamValue(kSRTPromptTrialName,
42 kSRTPromptSeedParamName);
45 } // namespace safe_browsing