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

Side by Side Diff: chrome/browser/ssl/ssl_error_classification.cc

Issue 914253004: Fix captive portal histogram in SSL interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <vector> 5 #include <vector>
6 6
7 #include "chrome/browser/ssl/ssl_error_classification.h" 7 #include "chrome/browser/ssl/ssl_error_classification.h"
8 8
9 #include "base/build_time.h" 9 #include "base/build_time.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 LOCALHOST, 53 LOCALHOST,
54 PRIVATE_URL, 54 PRIVATE_URL,
55 AUTHORITY_ERROR_CAPTIVE_PORTAL, 55 AUTHORITY_ERROR_CAPTIVE_PORTAL,
56 SELF_SIGNED, 56 SELF_SIGNED,
57 EXPIRED_RECENTLY, 57 EXPIRED_RECENTLY,
58 UNUSED_INTERSTITIAL_CAUSE_ENTRY, 58 UNUSED_INTERSTITIAL_CAUSE_ENTRY,
59 }; 59 };
60 60
61 // Events for UMA. Do not reorder or change! 61 // Events for UMA. Do not reorder or change!
62 enum SSLInterstitialCauseCaptivePortal { 62 enum SSLInterstitialCauseCaptivePortal {
63 CAPTIVE_PORTAL_ALL,
felt 2015/02/12 01:35:37 All older data will get bucketed incorrectly as a
63 CAPTIVE_PORTAL_DETECTION_ENABLED, 64 CAPTIVE_PORTAL_DETECTION_ENABLED,
64 CAPTIVE_PORTAL_DETECTION_ENABLED_OVERRIDABLE, 65 CAPTIVE_PORTAL_DETECTION_ENABLED_OVERRIDABLE,
65 CAPTIVE_PORTAL_PROBE_COMPLETED, 66 CAPTIVE_PORTAL_PROBE_COMPLETED,
66 CAPTIVE_PORTAL_PROBE_COMPLETED_OVERRIDABLE, 67 CAPTIVE_PORTAL_PROBE_COMPLETED_OVERRIDABLE,
67 CAPTIVE_PORTAL_NO_RESPONSE, 68 CAPTIVE_PORTAL_NO_RESPONSE,
68 CAPTIVE_PORTAL_NO_RESPONSE_OVERRIDABLE, 69 CAPTIVE_PORTAL_NO_RESPONSE_OVERRIDABLE,
69 CAPTIVE_PORTAL_DETECTED, 70 CAPTIVE_PORTAL_DETECTED,
70 CAPTIVE_PORTAL_DETECTED_OVERRIDABLE, 71 CAPTIVE_PORTAL_DETECTED_OVERRIDABLE,
71 UNUSED_CAPTIVE_PORTAL_EVENT, 72 UNUSED_CAPTIVE_PORTAL_EVENT,
72 }; 73 };
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 chrome::NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT, 142 chrome::NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT,
142 content::Source<Profile>(profile)); 143 content::Source<Profile>(profile));
143 #endif 144 #endif
144 } 145 }
145 146
146 SSLErrorClassification::~SSLErrorClassification() { } 147 SSLErrorClassification::~SSLErrorClassification() { }
147 148
148 void SSLErrorClassification::RecordCaptivePortalUMAStatistics( 149 void SSLErrorClassification::RecordCaptivePortalUMAStatistics(
149 bool overridable) const { 150 bool overridable) const {
150 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 151 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
152 RecordCaptivePortalEventStats(CAPTIVE_PORTAL_ALL);
151 if (captive_portal_detection_enabled_) 153 if (captive_portal_detection_enabled_)
152 RecordCaptivePortalEventStats( 154 RecordCaptivePortalEventStats(
153 overridable ? 155 overridable ?
154 CAPTIVE_PORTAL_DETECTION_ENABLED_OVERRIDABLE : 156 CAPTIVE_PORTAL_DETECTION_ENABLED_OVERRIDABLE :
155 CAPTIVE_PORTAL_DETECTION_ENABLED); 157 CAPTIVE_PORTAL_DETECTION_ENABLED);
156 if (captive_portal_probe_completed_) 158 if (captive_portal_probe_completed_)
157 RecordCaptivePortalEventStats( 159 RecordCaptivePortalEventStats(
158 overridable ? 160 overridable ?
159 CAPTIVE_PORTAL_PROBE_COMPLETED_OVERRIDABLE : 161 CAPTIVE_PORTAL_PROBE_COMPLETED_OVERRIDABLE :
160 CAPTIVE_PORTAL_PROBE_COMPLETED); 162 CAPTIVE_PORTAL_PROBE_COMPLETED);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // sure we don't clear the captive protal flag, since the interstitial was 493 // sure we don't clear the captive protal flag, since the interstitial was
492 // potentially caused by the captive portal. 494 // potentially caused by the captive portal.
493 captive_portal_detected_ = captive_portal_detected_ || 495 captive_portal_detected_ = captive_portal_detected_ ||
494 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); 496 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL);
495 // Also keep track of non-HTTP portals and error cases. 497 // Also keep track of non-HTTP portals and error cases.
496 captive_portal_no_response_ = captive_portal_no_response_ || 498 captive_portal_no_response_ = captive_portal_no_response_ ||
497 (results->result == captive_portal::RESULT_NO_RESPONSE); 499 (results->result == captive_portal::RESULT_NO_RESPONSE);
498 } 500 }
499 #endif 501 #endif
500 } 502 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698