Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h

Issue 2973873002: Primary histograms for InBrowserCleanerUI experiment (Closed)
Patch Set: Revert changes to histogram.cc Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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" 10 #include "base/feature_list.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 namespace safe_browsing { 13 namespace safe_browsing {
14 14
15 // These values are used to send UMA information and are replicated in the 15 // These values are used to send UMA information and are replicated in the
16 // histograms.xml file, so the order MUST NOT CHANGE. 16 // histograms.xml file, so the order MUST NOT CHANGE.
17 enum SRTPromptHistogramValue { 17 enum SRTPromptHistogramValue {
18 SRT_PROMPT_SHOWN = 0, 18 SRT_PROMPT_SHOWN = 0,
19 SRT_PROMPT_ACCEPTED = 1, 19 SRT_PROMPT_ACCEPTED = 1,
20 SRT_PROMPT_DENIED = 2, 20 SRT_PROMPT_DENIED = 2,
21 SRT_PROMPT_FALLBACK = 3, 21 SRT_PROMPT_FALLBACK = 3,
22 SRT_PROMPT_DOWNLOAD_UNAVAILABLE = 4, 22 SRT_PROMPT_DOWNLOAD_UNAVAILABLE = 4,
23 SRT_PROMPT_CLOSED = 5, 23 SRT_PROMPT_CLOSED = 5,
24 SRT_PROMPT_SHOWN_FROM_MENU = 6, 24 SRT_PROMPT_SHOWN_FROM_MENU = 6,
25 25
26 SRT_PROMPT_MAX, 26 SRT_PROMPT_MAX,
27 }; 27 };
28 28
29 // These values are used to send UMA information and are replicated in the
30 // histograms.xml file, so the order MUST NOT CHANGE.
31 enum NoPromptReasonHistogramValue {
32 NO_PROMPT_REASON_BEHAVIOUR_NOT_SUPPORTED = 0,
33 NO_PROMPT_REASON_FEATURE_NOT_ENABLED = 1,
34 NO_PROMPT_REASON_NOTHING_FOUND = 2,
35 NO_PROMPT_REASON_ALREADY_PROMPTED = 3,
36 NO_PROMPT_REASON_CLEANER_DOWNLOAD_FAILED = 4,
37 NO_PROMPT_REASON_BROWSER_NOT_AVAILABLE = 5,
38 NO_PROMPT_REASON_NOT_ON_IDLE_STATE = 6,
39 NO_PROMPT_REASON_IPC_CONNECTION_BROKEN = 7,
40
41 NO_PROMPT_REASON_MAX,
42 };
43
29 // When enabled, all user interaction with the Chrome Cleaner will happen from 44 // When enabled, all user interaction with the Chrome Cleaner will happen from
30 // within Chrome. 45 // within Chrome.
31 extern const base::Feature kInBrowserCleanerUIFeature; 46 extern const base::Feature kInBrowserCleanerUIFeature;
32 47
33 // Returns true if this Chrome is in a field trial group which shows the SRT 48 // Returns true if this Chrome is in a field trial group which shows the SRT
34 // prompt. 49 // prompt.
35 bool IsInSRTPromptFieldTrialGroups(); 50 bool IsInSRTPromptFieldTrialGroups();
36 51
37 // Returns true if this Chrome is in a field trial group which doesn't need an 52 // Returns true if this Chrome is in a field trial group which doesn't need an
38 // elevation icon, i.e., the SRT won't ask for elevation on startup. 53 // elevation icon, i.e., the SRT won't ask for elevation on startup.
39 bool SRTPromptNeedsElevationIcon(); 54 bool SRTPromptNeedsElevationIcon();
40 55
41 // Returns true if this Chrome is in a field trial group which enables running 56 // Returns true if this Chrome is in a field trial group which enables running
42 // the SwReporter. 57 // the SwReporter.
43 bool IsSwReporterEnabled(); 58 bool IsSwReporterEnabled();
44 59
45 // Returns the correct SRT download URL for the current field trial. 60 // Returns the correct SRT download URL for the current field trial.
46 GURL GetSRTDownloadURL(); 61 GURL GetSRTDownloadURL();
47 62
48 // Returns the value of the incoming SRT seed. 63 // Returns the value of the incoming SRT seed.
49 std::string GetIncomingSRTSeed(); 64 std::string GetIncomingSRTSeed();
50 65
51 // Records a value for the SRT Prompt Histogram. 66 // Records a value for the SRT Prompt Histogram.
52 void RecordSRTPromptHistogram(SRTPromptHistogramValue value); 67 void RecordSRTPromptHistogram(SRTPromptHistogramValue value);
53 68
69 // Records a SoftwareReporter.PromptShown histogram with value true.
70 void RecordPromptShownHistogram();
71
72 // Records a SoftwareReporter.PromptShown histogram with value false and
73 // a SoftwareReporter.NoPromptReason histogram with the reason corresponding
74 // to |value|.
75 void RecordPromptNotShownWithReasonHistogram(
76 NoPromptReasonHistogramValue value);
77
54 } // namespace safe_browsing 78 } // namespace safe_browsing
55 79
56 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_ 80 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_FIELD_TRIAL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698