Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / safe_browsing / srt_field_trial_win.h
blob6a43acd9b293c0fe237de4c65a8953ec511537a5
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_
8 #include <string>
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 {
15 SRT_PROMPT_SHOWN = 0,
16 SRT_PROMPT_ACCEPTED = 1,
17 SRT_PROMPT_DENIED = 2,
18 SRT_PROMPT_FALLBACK = 3,
19 SRT_PROMPT_DOWNLOAD_UNAVAILABLE = 4,
20 SRT_PROMPT_CLOSED = 5,
21 SRT_PROMPT_SHOWN_FROM_MENU = 6,
23 SRT_PROMPT_MAX,
25 enum SwReporterUmaValue {
26 // Deprecated.
27 SW_REPORTER_EXPLICIT_REQUEST = 0,
28 // Deprecated.
29 SW_REPORTER_STARTUP_RETRY = 1,
30 // Deprecated.
31 SW_REPORTER_RETRIED_TOO_MANY_TIMES = 2,
32 SW_REPORTER_START_EXECUTION = 3,
33 SW_REPORTER_FAILED_TO_START = 4,
34 SW_REPORTER_REGISTRY_EXIT_CODE = 5,
35 // Deprecated.
36 SW_REPORTER_RESET_RETRIES = 6,
37 SW_REPORTER_DOWNLOAD_START = 7,
38 SW_REPORTER_NO_BROWSER = 8,
39 SW_REPORTER_NO_LOCAL_STATE = 9,
40 SW_REPORTER_NO_PROMPT_NEEDED = 10,
41 SW_REPORTER_NO_PROMPT_FIELD_TRIAL = 11,
42 SW_REPORTER_ALREADY_PROMPTED = 12,
43 SW_REPORTER_RAN_DAILY = 13,
44 SW_REPORTER_ADDED_TO_MENU = 14,
46 SW_REPORTER_MAX,
49 // Returns true if this Chrome is in a field trial group which shows the SRT
50 // prompt.
51 bool IsInSRTPromptFieldTrialGroups();
53 // Returns true if this Chrome is in a field trial group which doesn't need an
54 // elevation icon, i.e., the SRT won't ask for elevation on startup.
55 bool SRTPromptNeedsElevationIcon();
57 // Returns the correct SRT download URL for the current field trial.
58 const char* GetSRTDownloadURL();
60 // Returns the value of the incoming SRT seed.
61 std::string GetIncomingSRTSeed();
63 // Records a value for the SRT Prompt Histogram.
64 void RecordSRTPromptHistogram(SRTPromptHistogramValue value);
66 // Records a value for the reporter step Histogram.
67 void RecordReporterStepHistogram(SwReporterUmaValue value);
69 } // namespace safe_browsing
71 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_FIELD_TRIAL_WIN_H_