OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/feature_list.h" |
| 11 |
10 namespace safe_browsing { | 12 namespace safe_browsing { |
11 | 13 |
12 // These values are used to send UMA information and are replicated in the | 14 // These values are used to send UMA information and are replicated in the |
13 // histograms.xml file, so the order MUST NOT CHANGE. | 15 // histograms.xml file, so the order MUST NOT CHANGE. |
14 enum SRTPromptHistogramValue { | 16 enum SRTPromptHistogramValue { |
15 SRT_PROMPT_SHOWN = 0, | 17 SRT_PROMPT_SHOWN = 0, |
16 SRT_PROMPT_ACCEPTED = 1, | 18 SRT_PROMPT_ACCEPTED = 1, |
17 SRT_PROMPT_DENIED = 2, | 19 SRT_PROMPT_DENIED = 2, |
18 SRT_PROMPT_FALLBACK = 3, | 20 SRT_PROMPT_FALLBACK = 3, |
19 SRT_PROMPT_DOWNLOAD_UNAVAILABLE = 4, | 21 SRT_PROMPT_DOWNLOAD_UNAVAILABLE = 4, |
20 SRT_PROMPT_CLOSED = 5, | 22 SRT_PROMPT_CLOSED = 5, |
21 SRT_PROMPT_SHOWN_FROM_MENU = 6, | 23 SRT_PROMPT_SHOWN_FROM_MENU = 6, |
22 | 24 |
23 SRT_PROMPT_MAX, | 25 SRT_PROMPT_MAX, |
24 }; | 26 }; |
25 | 27 |
| 28 // When enabled, all user interaction with the Chrome Cleaner will happen from |
| 29 // within Chrome. |
| 30 extern const base::Feature kInBrowserCleanerUIFeature; |
| 31 |
26 // Returns true if this Chrome is in a field trial group which shows the SRT | 32 // Returns true if this Chrome is in a field trial group which shows the SRT |
27 // prompt. | 33 // prompt. |
28 bool IsInSRTPromptFieldTrialGroups(); | 34 bool IsInSRTPromptFieldTrialGroups(); |
29 | 35 |
30 // Returns true if this Chrome is in a field trial group which doesn't need an | 36 // Returns true if this Chrome is in a field trial group which doesn't need an |
31 // elevation icon, i.e., the SRT won't ask for elevation on startup. | 37 // elevation icon, i.e., the SRT won't ask for elevation on startup. |
32 bool SRTPromptNeedsElevationIcon(); | 38 bool SRTPromptNeedsElevationIcon(); |
33 | 39 |
34 // Returns true if this Chrome is in a field trial group which enables running | 40 // Returns true if this Chrome is in a field trial group which enables running |
35 // the SwReporter. | 41 // the SwReporter. |
36 bool IsSwReporterEnabled(); | 42 bool IsSwReporterEnabled(); |
37 | 43 |
38 // Returns the correct SRT download URL for the current field trial. | 44 // Returns the correct SRT download URL for the current field trial. |
39 const char* GetSRTDownloadURL(); | 45 const char* GetSRTDownloadURL(); |
40 | 46 |
41 // Returns the value of the incoming SRT seed. | 47 // Returns the value of the incoming SRT seed. |
42 std::string GetIncomingSRTSeed(); | 48 std::string GetIncomingSRTSeed(); |
43 | 49 |
44 // Records a value for the SRT Prompt Histogram. | 50 // Records a value for the SRT Prompt Histogram. |
45 void RecordSRTPromptHistogram(SRTPromptHistogramValue value); | 51 void RecordSRTPromptHistogram(SRTPromptHistogramValue value); |
46 | 52 |
47 } // namespace safe_browsing | 53 } // namespace safe_browsing |
48 | 54 |
49 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_ | 55 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_ |
OLD | NEW |