Commit e6e17b9d authored by felt's avatar felt Committed by Commit bot

Update the Safe Browsing interstitial histograms

This organizes the Safe Browsing interstitial histograms in a way that
should scale better as new warnings or buttons are added.

Plus: all of the recording is done from within the command handling
method, instead of in the secondary methods like OnProceed.

BUG=

Review URL: https://codereview.chromium.org/576653002

Cr-Commit-Position: refs/heads/master@{#295294}
parent 83e3491e
...@@ -125,16 +125,27 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate { ...@@ -125,16 +125,27 @@ class SafeBrowsingBlockingPage : public content::InterstitialPageDelegate {
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
MalwareReportsToggling); MalwareReportsToggling);
enum BlockingPageEvent { // These enums are used for histograms. Don't reorder, delete, or insert
// elements. New elements should be added before MAX_ACTION only.
enum Decision {
SHOW, SHOW,
PROCEED, PROCEED,
DONT_PROCEED, DONT_PROCEED,
PROCEEDING_DISABLED,
MAX_DECISION
};
enum Interaction {
TOTAL_VISITS,
SHOW_ADVANCED, SHOW_ADVANCED,
SHOW_PRIVACY_POLICY,
SHOW_DIAGNOSTIC,
SHOW_LEARN_MORE,
MAX_INTERACTION
}; };
// Records a user action for this interstitial, using the form // Record a user decision or interaction to the appropriate UMA histogram.
// SBInterstitial[Phishing|Malware|Multiple][Show|Proceed|DontProceed]. void RecordUserDecision(Decision decision);
void RecordUserAction(BlockingPageEvent event); void RecordUserInteraction(Interaction interaction);
// Used to query the HistoryService to see if the URL is in history. For UMA. // Used to query the HistoryService to see if the URL is in history. For UMA.
void OnGotHistoryCount(bool success, int num_visits, base::Time first_visit); void OnGotHistoryCount(bool success, int num_visits, base::Time first_visit);
......
...@@ -10453,6 +10453,45 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -10453,6 +10453,45 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary> </summary>
</histogram> </histogram>
<histogram name="interstitial.malware.decision" enum="SB3InterstitialDecision">
<owner>felt@chromium.org</owner>
<summary>
User decision when presented with a Safe Browsing malware interstitial.
</summary>
</histogram>
<histogram name="interstitial.malware.decision.repeat_visit"
enum="SB3InterstitialDecision">
<owner>felt@chromium.org</owner>
<summary>
User decision when presented with a Safe Browsing malware interstitial for a
website that the user has visited before.
</summary>
</histogram>
<histogram name="interstitial.malware.interaction"
enum="SB3InterstitialInteraction">
<owner>felt@chromium.org</owner>
<summary>
User interactions with a Safe Browsing malware interstitial.
</summary>
</histogram>
<histogram name="interstitial.phishing.decision" enum="SB3InterstitialDecision">
<owner>felt@chromium.org</owner>
<summary>
User decision when presented with a Safe Browsing phishing interstitial.
</summary>
</histogram>
<histogram name="interstitial.phishing.interaction"
enum="SB3InterstitialInteraction">
<owner>felt@chromium.org</owner>
<summary>
User interactions with a Safe Browsing phishing interstitial.
</summary>
</histogram>
<histogram name="interstitial.ssl" enum="SSLResponseTypesV2"> <histogram name="interstitial.ssl" enum="SSLResponseTypesV2">
<owner>felt@chromium.org</owner> <owner>felt@chromium.org</owner>
<summary> <summary>
...@@ -27537,6 +27576,9 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -27537,6 +27576,9 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</histogram> </histogram>
<histogram name="SB2.InterstitialAction" enum="SB2InterstitialAction"> <histogram name="SB2.InterstitialAction" enum="SB2InterstitialAction">
<obsolete>
Deprecated, replaced by: interstitial.malware.* and interstitial.phishing.*.
</obsolete>
<owner>felt@chromium.org</owner> <owner>felt@chromium.org</owner>
<summary> <summary>
Track number of times Safe Browsing interstitials have been shown, and how Track number of times Safe Browsing interstitials have been shown, and how
...@@ -27546,6 +27588,9 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -27546,6 +27588,9 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<histogram name="SB2.InterstitialActionDetails" <histogram name="SB2.InterstitialActionDetails"
enum="SB2InterstitialActionDetails"> enum="SB2InterstitialActionDetails">
<obsolete>
Deprecated, replaced by: interstitial.malware.* and interstitial.phishing.*.
</obsolete>
<owner>felt@chromium.org</owner> <owner>felt@chromium.org</owner>
<summary> <summary>
Tracks the click-through rate for specific cases of the interstitial. Tracks the click-through rate for specific cases of the interstitial.
...@@ -49410,6 +49455,9 @@ To add a new entry, add it with any value and run test to compute valid value. ...@@ -49410,6 +49455,9 @@ To add a new entry, add it with any value and run test to compute valid value.
</enum> </enum>
<enum name="SB2InterstitialAction" type="int"> <enum name="SB2InterstitialAction" type="int">
<obsolete>
Deprecated 9/2014.
</obsolete>
<int value="0" label="MALWARE_SHOW"/> <int value="0" label="MALWARE_SHOW"/>
<int value="1" label="MALWARE_DONT_PROCEED"/> <int value="1" label="MALWARE_DONT_PROCEED"/>
<int value="2" label="MALWARE_FORCED_DONT_PROCEED"/> <int value="2" label="MALWARE_FORCED_DONT_PROCEED"/>
...@@ -49428,6 +49476,9 @@ To add a new entry, add it with any value and run test to compute valid value. ...@@ -49428,6 +49476,9 @@ To add a new entry, add it with any value and run test to compute valid value.
</enum> </enum>
<enum name="SB2InterstitialActionDetails" type="int"> <enum name="SB2InterstitialActionDetails" type="int">
<obsolete>
Deprecated 9/2014.
</obsolete>
<int value="0" label="MALWARE_SHOW_NEW_SITE"/> <int value="0" label="MALWARE_SHOW_NEW_SITE"/>
<int value="1" label="MALWARE_PROCEED_NEW_SITE"/> <int value="1" label="MALWARE_PROCEED_NEW_SITE"/>
<int value="2" label="MALWARE_SHOW_CROSS_SITE"/> <int value="2" label="MALWARE_SHOW_CROSS_SITE"/>
...@@ -49480,6 +49531,21 @@ To add a new entry, add it with any value and run test to compute valid value. ...@@ -49480,6 +49531,21 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="7" label="BACKUP_NETWORK_SUCCESS"/> <int value="7" label="BACKUP_NETWORK_SUCCESS"/>
</enum> </enum>
<enum name="SB3InterstitialDecision" type="int">
<int value="0" label="SHOW"/>
<int value="1" label="PROCEED"/>
<int value="2" label="DONT_PROCEED"/>
<int value="3" label="PROCEEDING_DISABLED"/>
</enum>
<enum name="SB3InterstitialInteraction" type="int">
<int value="0" label="TOTAL_VISITS"/>
<int value="1" label="SHOW_ADVANCED"/>
<int value="2" label="SHOW_PRIVACY"/>
<int value="3" label="SHOW_DIAGNOSTIC"/>
<int value="4" label="SHOW_LEARN_MORE"/>
</enum>
<enum name="SBClientDetectionPreClassificationCheckFail" type="int"> <enum name="SBClientDetectionPreClassificationCheckFail" type="int">
<int value="0" label="PROXY_FETCH"/> <int value="0" label="PROXY_FETCH"/>
<int value="1" label="PRIVATE_IP"/> <int value="1" label="PRIVATE_IP"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment