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

Unified Diff: chrome/browser/ssl/ssl_error_classification.cc

Issue 1341923002: Create a component for SSL error handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update iOS grit whitelist Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/ssl/ssl_error_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_error_classification.cc
diff --git a/chrome/browser/ssl/ssl_error_classification.cc b/chrome/browser/ssl/ssl_error_classification.cc
index 765209d6983750ad7dc55994ca4ad347cf5cc501..d78a1c507c62bc5e82b4ee488e4fe6e88a3e3e34 100644
--- a/chrome/browser/ssl/ssl_error_classification.cc
+++ b/chrome/browser/ssl/ssl_error_classification.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ssl/ssl_error_info.h"
+#include "components/ssl_errors/error_info.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
#include "net/base/net_util.h"
@@ -180,12 +180,12 @@ void SSLErrorClassification::RecordCaptivePortalUMAStatistics(
void SSLErrorClassification::RecordUMAStatistics(
bool overridable) const {
- SSLErrorInfo::ErrorType type =
- SSLErrorInfo::NetErrorToErrorType(cert_error_);
- UMA_HISTOGRAM_ENUMERATION(
- "interstitial.ssl_error_type", type, SSLErrorInfo::END_OF_ENUM);
+ ssl_errors::ErrorInfo::ErrorType type =
+ ssl_errors::ErrorInfo::NetErrorToErrorType(cert_error_);
+ UMA_HISTOGRAM_ENUMERATION("interstitial.ssl_error_type", type,
+ ssl_errors::ErrorInfo::END_OF_ENUM);
switch (type) {
- case SSLErrorInfo::CERT_DATE_INVALID: {
+ case ssl_errors::ErrorInfo::CERT_DATE_INVALID: {
if (IsUserClockInThePast(base::Time::NowFromSystemTime())) {
RecordSSLInterstitialCause(overridable, CLOCK_PAST);
} else if (IsUserClockInTheFuture(base::Time::NowFromSystemTime())) {
@@ -195,7 +195,7 @@ void SSLErrorClassification::RecordUMAStatistics(
}
break;
}
- case SSLErrorInfo::CERT_COMMON_NAME_INVALID: {
+ case ssl_errors::ErrorInfo::CERT_COMMON_NAME_INVALID: {
std::string host_name = request_url_.host();
if (IsHostNameKnownTLD(host_name)) {
Tokens host_name_tokens = Tokenize(host_name);
@@ -219,7 +219,7 @@ void SSLErrorClassification::RecordUMAStatistics(
}
break;
}
- case SSLErrorInfo::CERT_AUTHORITY_INVALID: {
+ case ssl_errors::ErrorInfo::CERT_AUTHORITY_INVALID: {
const std::string& hostname = request_url_.HostNoBrackets();
if (net::IsLocalhost(hostname))
RecordSSLInterstitialCause(overridable, LOCALHOST);
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/ssl/ssl_error_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698