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 #ifndef CHROME_BROWSER_SAFE_BROWSING_SRT_FIELD_TRIAL_WIN_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_FIELD_TRIAL_WIN_H_
10 namespace safe_browsing
{
12 // These two sets of values are used to send UMA information and are replicated
13 // in the histograms.xml file, so the order MUST NOT CHANGE.
14 enum SRTPromptHistogramValue
{
16 SRT_PROMPT_ACCEPTED
= 1,
17 SRT_PROMPT_DENIED
= 2,
18 SRT_PROMPT_FALLBACK
= 3,
19 SRT_PROMPT_DOWNLOAD_UNAVAILABLE
= 4,
23 enum SwReporterUmaValue
{
25 SW_REPORTER_EXPLICIT_REQUEST
= 0,
27 SW_REPORTER_STARTUP_RETRY
= 1,
29 SW_REPORTER_RETRIED_TOO_MANY_TIMES
= 2,
30 SW_REPORTER_START_EXECUTION
= 3,
31 SW_REPORTER_FAILED_TO_START
= 4,
32 SW_REPORTER_REGISTRY_EXIT_CODE
= 5,
34 SW_REPORTER_RESET_RETRIES
= 6,
35 SW_REPORTER_DOWNLOAD_START
= 7,
36 SW_REPORTER_NO_BROWSER
= 8,
37 SW_REPORTER_NO_LOCAL_STATE
= 9,
38 SW_REPORTER_NO_PROMPT_NEEDED
= 10,
39 SW_REPORTER_NO_PROMPT_FIELD_TRIAL
= 11,
40 SW_REPORTER_ALREADY_PROMPTED
= 12,
44 // Returns true if this Chrome is in a field trial group which shows the SRT
46 bool IsInSRTPromptFieldTrialGroups();
48 // Returns true if this Chrome is in a field trial group which doesn't need an
49 // elevation icon, i.e., the SRT won't ask for elevation on startup.
50 bool SRTPromptNeedsElevationIcon();
52 // Returns the correct SRT download URL for the current field trial.
53 const char* GetSRTDownloadURL();
55 // Returns the value of the incoming SRT seed.
56 std::string
GetIncomingSRTSeed();
58 // Records a value for the SRT Prompt Histogram.
59 void RecordSRTPromptHistogram(SRTPromptHistogramValue value
);
61 // Records a value for the reporter step Histogram.
62 void RecordReporterStepHistogram(SwReporterUmaValue value
);
64 } // namespace safe_browsing
66 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_FIELD_TRIAL_WIN_H_