| OLD | NEW |
| 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 "chrome/browser/ssl/captive_portal_blocking_page.h" | 5 #include "chrome/browser/ssl/captive_portal_blocking_page.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 14 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/ssl/cert_report_helper.h" | 16 #include "chrome/browser/ssl/cert_report_helper.h" |
| 17 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 17 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "components/captive_portal/captive_portal_detector.h" | 19 #include "components/captive_portal/captive_portal_detector.h" |
| 20 #include "components/url_formatter/url_formatter.h" | 20 #include "components/url_formatter/url_formatter.h" |
| 21 #include "components/wifi/wifi_service.h" | 21 #include "components/wifi/wifi_service.h" |
| 22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
| 24 #include "net/base/net_util.h" | 24 #include "net/base/net_util.h" |
| 25 #include "net/base/network_change_notifier.h" | 25 #include "net/base/network_change_notifier.h" |
| 26 #include "net/base/network_interfaces.h" |
| 26 #include "net/ssl/ssl_info.h" | 27 #include "net/ssl/ssl_info.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 28 | 29 |
| 29 #if !defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 30 #if !defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 30 #error This file must be built with ENABLE_CAPTIVE_PORTAL_DETECTION flag. | 31 #error This file must be built with ENABLE_CAPTIVE_PORTAL_DETECTION flag. |
| 31 #endif | 32 #endif |
| 32 | 33 |
| 33 namespace { | 34 namespace { |
| 34 | 35 |
| 35 // Events for UMA. | 36 // Events for UMA. |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 CertificateErrorReport::USER_DID_NOT_PROCEED); | 236 CertificateErrorReport::USER_DID_NOT_PROCEED); |
| 236 } | 237 } |
| 237 | 238 |
| 238 // Need to explicity deny the certificate via the callback, otherwise memory | 239 // Need to explicity deny the certificate via the callback, otherwise memory |
| 239 // is leaked. | 240 // is leaked. |
| 240 if (!callback_.is_null()) { | 241 if (!callback_.is_null()) { |
| 241 callback_.Run(false); | 242 callback_.Run(false); |
| 242 callback_.Reset(); | 243 callback_.Reset(); |
| 243 } | 244 } |
| 244 } | 245 } |
| OLD | NEW |