Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / safe_browsing / srt_field_trial_win.h
blob6fa056e6b1d0bae735bec8a80c761cbddf57abb4
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,
21 SRT_PROMPT_MAX,
23 enum SwReporterUmaValue {
24 // Deprecated.
25 SW_REPORTER_EXPLICIT_REQUEST = 0,
26 // Deprecated.
27 SW_REPORTER_STARTUP_RETRY = 1,
28 // Deprecated.
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,
33 // Deprecated.
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,
41 SW_REPORTER_MAX,
44 // Returns true if this Chrome is in a field trial group which shows the SRT
45 // prompt.
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_