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

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

Issue 7976036: net: make HSTS hosts use the normal SSL interstitials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 request->CancelAuth(); 105 request->CancelAuth();
106 } 106 }
107 107
108 void URLRequest::Delegate::OnCertificateRequested( 108 void URLRequest::Delegate::OnCertificateRequested(
109 URLRequest* request, 109 URLRequest* request,
110 SSLCertRequestInfo* cert_request_info) { 110 SSLCertRequestInfo* cert_request_info) {
111 request->Cancel(); 111 request->Cancel();
112 } 112 }
113 113
114 void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request, 114 void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request,
115 int cert_error, 115 const SSLInfo& ssl_info,
116 X509Certificate* cert) { 116 bool is_hsts_ok) {
117 request->Cancel(); 117 request->Cancel();
118 } 118 }
119 119
120 bool URLRequest::Delegate::CanGetCookies(const URLRequest* request, 120 bool URLRequest::Delegate::CanGetCookies(const URLRequest* request,
121 const CookieList& cookie_list) const { 121 const CookieList& cookie_list) const {
122 return true; 122 return true;
123 } 123 }
124 124
125 bool URLRequest::Delegate::CanSetCookie(const URLRequest* request, 125 bool URLRequest::Delegate::CanSetCookie(const URLRequest* request,
126 const std::string& cookie_line, 126 const std::string& cookie_line,
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 if (delegate_) 776 if (delegate_)
777 delegate_->OnAuthRequired(this, auth_info); 777 delegate_->OnAuthRequired(this, auth_info);
778 } 778 }
779 779
780 void URLRequest::NotifyCertificateRequested( 780 void URLRequest::NotifyCertificateRequested(
781 SSLCertRequestInfo* cert_request_info) { 781 SSLCertRequestInfo* cert_request_info) {
782 if (delegate_) 782 if (delegate_)
783 delegate_->OnCertificateRequested(this, cert_request_info); 783 delegate_->OnCertificateRequested(this, cert_request_info);
784 } 784 }
785 785
786 void URLRequest::NotifySSLCertificateError(int cert_error, 786 void URLRequest::NotifySSLCertificateError(const SSLInfo& ssl_info,
787 X509Certificate* cert) { 787 bool is_hsts_host) {
788 if (delegate_) 788 if (delegate_)
789 delegate_->OnSSLCertificateError(this, cert_error, cert); 789 delegate_->OnSSLCertificateError(this, ssl_info, is_hsts_host);
790 } 790 }
791 791
792 bool URLRequest::CanGetCookies(const CookieList& cookie_list) const { 792 bool URLRequest::CanGetCookies(const CookieList& cookie_list) const {
793 if (delegate_) 793 if (delegate_)
794 return delegate_->CanGetCookies(this, cookie_list); 794 return delegate_->CanGetCookies(this, cookie_list);
795 return false; 795 return false;
796 } 796 }
797 797
798 bool URLRequest::CanSetCookie(const std::string& cookie_line, 798 bool URLRequest::CanSetCookie(const std::string& cookie_line,
799 CookieOptions* options) const { 799 CookieOptions* options) const {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL); 831 net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
832 } 832 }
833 833
834 void URLRequest::SetUnblockedOnDelegate() { 834 void URLRequest::SetUnblockedOnDelegate() {
835 blocked_on_delegate_ = false; 835 blocked_on_delegate_ = false;
836 load_state_param_.clear(); 836 load_state_param_.clear();
837 net_log_.EndEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL); 837 net_log_.EndEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
838 } 838 }
839 839
840 } // namespace net 840 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698