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

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, 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 unified diff | Download patch | Annotate | Revision Log
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 int cert_error,
116 X509Certificate* cert) { 116 const SSLInfo& ssl_info,
117 bool must_be_fatal) {
117 request->Cancel(); 118 request->Cancel();
118 } 119 }
119 120
120 bool URLRequest::Delegate::CanGetCookies(const URLRequest* request, 121 bool URLRequest::Delegate::CanGetCookies(const URLRequest* request,
121 const CookieList& cookie_list) const { 122 const CookieList& cookie_list) const {
122 return true; 123 return true;
123 } 124 }
124 125
125 bool URLRequest::Delegate::CanSetCookie(const URLRequest* request, 126 bool URLRequest::Delegate::CanSetCookie(const URLRequest* request,
126 const std::string& cookie_line, 127 const std::string& cookie_line,
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 delegate_->OnAuthRequired(this, auth_info); 778 delegate_->OnAuthRequired(this, auth_info);
778 } 779 }
779 780
780 void URLRequest::NotifyCertificateRequested( 781 void URLRequest::NotifyCertificateRequested(
781 SSLCertRequestInfo* cert_request_info) { 782 SSLCertRequestInfo* cert_request_info) {
782 if (delegate_) 783 if (delegate_)
783 delegate_->OnCertificateRequested(this, cert_request_info); 784 delegate_->OnCertificateRequested(this, cert_request_info);
784 } 785 }
785 786
786 void URLRequest::NotifySSLCertificateError(int cert_error, 787 void URLRequest::NotifySSLCertificateError(int cert_error,
787 X509Certificate* cert) { 788 const SSLInfo& ssl_info,
789 bool must_be_fatal) {
788 if (delegate_) 790 if (delegate_)
789 delegate_->OnSSLCertificateError(this, cert_error, cert); 791 delegate_->OnSSLCertificateError(this, cert_error, ssl_info, must_be_fatal);
790 } 792 }
791 793
792 bool URLRequest::CanGetCookies(const CookieList& cookie_list) const { 794 bool URLRequest::CanGetCookies(const CookieList& cookie_list) const {
793 if (delegate_) 795 if (delegate_)
794 return delegate_->CanGetCookies(this, cookie_list); 796 return delegate_->CanGetCookies(this, cookie_list);
795 return false; 797 return false;
796 } 798 }
797 799
798 bool URLRequest::CanSetCookie(const std::string& cookie_line, 800 bool URLRequest::CanSetCookie(const std::string& cookie_line,
799 CookieOptions* options) const { 801 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); 833 net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
832 } 834 }
833 835
834 void URLRequest::SetUnblockedOnDelegate() { 836 void URLRequest::SetUnblockedOnDelegate() {
835 blocked_on_delegate_ = false; 837 blocked_on_delegate_ = false;
836 load_state_param_.clear(); 838 load_state_param_.clear();
837 net_log_.EndEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL); 839 net_log_.EndEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
838 } 840 }
839 841
840 } // namespace net 842 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698