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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 935663004: Add checkbox for reporting invalid TLS/SSL cert chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix styling on checkbox for SSL interstitial Created 5 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 const URLRequestContext* context = request_->context(); 865 const URLRequestContext* context = request_->context();
866 866
867 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN && 867 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN &&
868 transaction_->GetResponseInfo() != NULL) { 868 transaction_->GetResponseInfo() != NULL) {
869 FraudulentCertificateReporter* reporter = 869 FraudulentCertificateReporter* reporter =
870 context->fraudulent_certificate_reporter(); 870 context->fraudulent_certificate_reporter();
871 if (reporter != NULL) { 871 if (reporter != NULL) {
872 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info; 872 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info;
873 const std::string& host = request_->url().host(); 873 const std::string& host = request_->url().host();
874 874
875 reporter->SendReport(host, ssl_info); 875 reporter->SendReport(
876 FraudulentCertificateReporter::REPORT_TYPE_PIN_VIOLATION, host,
877 ssl_info);
876 } 878 }
877 } 879 }
878 880
879 if (result == OK) { 881 if (result == OK) {
880 if (transaction_ && transaction_->GetResponseInfo()) { 882 if (transaction_ && transaction_->GetResponseInfo()) {
881 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); 883 SetProxyServer(transaction_->GetResponseInfo()->proxy_server);
882 } 884 }
883 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); 885 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders();
884 if (network_delegate()) { 886 if (network_delegate()) {
885 // Note that |this| may not be deleted until 887 // Note that |this| may not be deleted until
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 return override_response_headers_.get() ? 1501 return override_response_headers_.get() ?
1500 override_response_headers_.get() : 1502 override_response_headers_.get() :
1501 transaction_->GetResponseInfo()->headers.get(); 1503 transaction_->GetResponseInfo()->headers.get();
1502 } 1504 }
1503 1505
1504 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1506 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1505 awaiting_callback_ = false; 1507 awaiting_callback_ = false;
1506 } 1508 }
1507 1509
1508 } // namespace net 1510 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698