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

Unified Diff: chromecast/net/connectivity_checker_impl.cc

Issue 2725293003: [Chromecast] Respect "ignore-certificate-errors" in connectivity_checker (Closed)
Patch Set: Get ignore_certificate_errors setting from url_request_ Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/net/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/net/connectivity_checker_impl.cc
diff --git a/chromecast/net/connectivity_checker_impl.cc b/chromecast/net/connectivity_checker_impl.cc
index 6c1b234add6d135a778b82660cf9ea5f0771c9e2..17e7c5b0df4f1601df39cbe0556d810554b0dc50 100644
--- a/chromecast/net/connectivity_checker_impl.cc
+++ b/chromecast/net/connectivity_checker_impl.cc
@@ -15,9 +15,11 @@
#include "chromecast/chromecast_features.h"
#include "chromecast/net/net_switches.h"
#include "net/base/request_priority.h"
+#include "net/http/http_network_session.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
#include "net/http/http_status_code.h"
+#include "net/http/http_transaction_factory.h"
#include "net/socket/ssl_client_socket.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
@@ -212,6 +214,15 @@ void ConnectivityCheckerImpl::OnSSLCertificateError(
net::URLRequest* request,
const net::SSLInfo& ssl_info,
bool fatal) {
+ if (url_request_context_->http_transaction_factory()
+ ->GetSession()
+ ->params()
+ .ignore_certificate_errors) {
+ LOG(WARNING) << "OnSSLCertificateError: ignore cert_status="
+ << ssl_info.cert_status;
+ request->ContinueDespiteLastError();
+ return;
+ }
DCHECK(task_runner_->BelongsToCurrentThread());
LOG(ERROR) << "OnSSLCertificateError: cert_status=" << ssl_info.cert_status;
net::SSLClientSocket::ClearSessionCache();
« no previous file with comments | « chromecast/net/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698