| OLD | NEW |
| 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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "components/prefs/pref_service.h" | 12 #include "components/prefs/pref_service.h" |
| 13 #include "components/security_interstitials/core/metrics_helper.h" | 13 #include "components/security_interstitials/core/metrics_helper.h" |
| 14 #include "components/security_interstitials/core/ssl_error_ui.h" | 14 #include "components/security_interstitials/core/ssl_error_ui.h" |
| 15 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 15 #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h" | 16 #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h" |
| 16 #include "ios/chrome/browser/interstitials/ios_chrome_metrics_helper.h" | 17 #include "ios/chrome/browser/interstitials/ios_chrome_metrics_helper.h" |
| 17 #include "ios/chrome/browser/pref_names.h" | 18 #include "ios/chrome/browser/pref_names.h" |
| 18 #include "ios/chrome/grit/ios_strings.h" | 19 #include "ios/chrome/grit/ios_strings.h" |
| 19 #include "ios/public/provider/chrome/browser/browser_constants.h" | 20 #include "ios/public/provider/chrome/browser/browser_constants.h" |
| 20 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 21 #include "ios/web/public/web_state/web_state.h" | 21 #include "ios/web/public/web_state/web_state.h" |
| 22 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 25 | 25 |
| 26 using security_interstitials::SSLErrorUI; | 26 using security_interstitials::SSLErrorUI; |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 // Events for UMA. Do not reorder or change! | 29 // Events for UMA. Do not reorder or change! |
| 30 enum SSLExpirationAndDecision { | 30 enum SSLExpirationAndDecision { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 callback_.Reset(); | 198 callback_.Reset(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 // static | 201 // static |
| 202 bool IOSSSLBlockingPage::IsOverridable(int options_mask) { | 202 bool IOSSSLBlockingPage::IsOverridable(int options_mask) { |
| 203 const bool is_overridable = | 203 const bool is_overridable = |
| 204 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && | 204 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && |
| 205 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT); | 205 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT); |
| 206 return is_overridable; | 206 return is_overridable; |
| 207 } | 207 } |
| OLD | NEW |