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

Side by Side Diff: ios/chrome/browser/ssl/ios_ssl_blocking_page.mm

Issue 1921533004: Add a low-frequency RAPPOR configuration, and use it for Safe Browsing and Permissions metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ssl/ios_ssl_blocking_page.h" 5 #include "ios/chrome/browser/ssl/ios_ssl_blocking_page.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 22 matching lines...) Expand all
33 enum SSLExpirationAndDecision { 33 enum SSLExpirationAndDecision {
34 EXPIRED_AND_PROCEED, 34 EXPIRED_AND_PROCEED,
35 EXPIRED_AND_DO_NOT_PROCEED, 35 EXPIRED_AND_DO_NOT_PROCEED,
36 NOT_EXPIRED_AND_PROCEED, 36 NOT_EXPIRED_AND_PROCEED,
37 NOT_EXPIRED_AND_DO_NOT_PROCEED, 37 NOT_EXPIRED_AND_DO_NOT_PROCEED,
38 END_OF_SSL_EXPIRATION_AND_DECISION, 38 END_OF_SSL_EXPIRATION_AND_DECISION,
39 }; 39 };
40 40
41 // Rappor prefix, which is used for both overridable and non-overridable 41 // Rappor prefix, which is used for both overridable and non-overridable
42 // interstitials so we don't leak the "overridable" bit. 42 // interstitials so we don't leak the "overridable" bit.
43 const char kSSLRapporPrefix[] = "ssl2"; 43 const char kDeprecatedSSLRapporPrefix[] = "ssl2";
44 const char kSSLRapporPrefix[] = "ssl3";
44 45
45 void RecordSSLExpirationPageEventState(bool expired_but_previously_allowed, 46 void RecordSSLExpirationPageEventState(bool expired_but_previously_allowed,
46 bool proceed, 47 bool proceed,
47 bool overridable) { 48 bool overridable) {
48 SSLExpirationAndDecision event; 49 SSLExpirationAndDecision event;
49 if (expired_but_previously_allowed && proceed) 50 if (expired_but_previously_allowed && proceed)
50 event = EXPIRED_AND_PROCEED; 51 event = EXPIRED_AND_PROCEED;
51 else if (expired_but_previously_allowed && !proceed) 52 else if (expired_but_previously_allowed && !proceed)
52 event = EXPIRED_AND_DO_NOT_PROCEED; 53 event = EXPIRED_AND_DO_NOT_PROCEED;
53 else if (!expired_but_previously_allowed && proceed) 54 else if (!expired_but_previously_allowed && proceed)
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 callback_.Reset(); 209 callback_.Reset();
209 } 210 }
210 211
211 // static 212 // static
212 bool IOSSSLBlockingPage::IsOverridable(int options_mask) { 213 bool IOSSSLBlockingPage::IsOverridable(int options_mask) {
213 const bool is_overridable = 214 const bool is_overridable =
214 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && 215 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) &&
215 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT); 216 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT);
216 return is_overridable; 217 return is_overridable;
217 } 218 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698