| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/loader/resource_loader.h" | 5 #include "content/browser/loader/resource_loader.h" |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "content/browser/browser_thread_impl.h" | 8 #include "content/browser/browser_thread_impl.h" |
| 9 #include "content/browser/loader/resource_loader_delegate.h" | 9 #include "content/browser/loader/resource_loader_delegate.h" |
| 10 #include "content/public/browser/resource_request_info.h" | 10 #include "content/public/browser/resource_request_info.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), | 172 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), |
| 173 resource_context_(&test_url_request_context_) { | 173 resource_context_(&test_url_request_context_) { |
| 174 } | 174 } |
| 175 | 175 |
| 176 // ResourceLoaderDelegate: | 176 // ResourceLoaderDelegate: |
| 177 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( | 177 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( |
| 178 ResourceLoader* loader, | 178 ResourceLoader* loader, |
| 179 net::AuthChallengeInfo* auth_info) OVERRIDE { | 179 net::AuthChallengeInfo* auth_info) OVERRIDE { |
| 180 return NULL; | 180 return NULL; |
| 181 } | 181 } |
| 182 virtual bool AcceptAuthRequest( | |
| 183 ResourceLoader* loader, | |
| 184 net::AuthChallengeInfo* auth_info) OVERRIDE { | |
| 185 return false; | |
| 186 }; | |
| 187 virtual bool AcceptSSLClientCertificateRequest( | |
| 188 ResourceLoader* loader, | |
| 189 net::SSLCertRequestInfo* cert_info) OVERRIDE { | |
| 190 return true; | |
| 191 } | |
| 192 virtual bool HandleExternalProtocol(ResourceLoader* loader, | 182 virtual bool HandleExternalProtocol(ResourceLoader* loader, |
| 193 const GURL& url) OVERRIDE { | 183 const GURL& url) OVERRIDE { |
| 194 return false; | 184 return false; |
| 195 } | 185 } |
| 196 virtual void DidStartRequest(ResourceLoader* loader) OVERRIDE {} | 186 virtual void DidStartRequest(ResourceLoader* loader) OVERRIDE {} |
| 197 virtual void DidReceiveRedirect(ResourceLoader* loader, | 187 virtual void DidReceiveRedirect(ResourceLoader* loader, |
| 198 const GURL& new_url) OVERRIDE {} | 188 const GURL& new_url) OVERRIDE {} |
| 199 virtual void DidReceiveResponse(ResourceLoader* loader) OVERRIDE {} | 189 virtual void DidReceiveResponse(ResourceLoader* loader) OVERRIDE {} |
| 200 virtual void DidFinishLoading(ResourceLoader* loader) OVERRIDE {} | 190 virtual void DidFinishLoading(ResourceLoader* loader) OVERRIDE {} |
| 201 | 191 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 // Restore the original content browser client. | 307 // Restore the original content browser client. |
| 318 SetBrowserClientForTesting(old_client); | 308 SetBrowserClientForTesting(old_client); |
| 319 | 309 |
| 320 // Check if the SelectClientCertificate was called on the content browser | 310 // Check if the SelectClientCertificate was called on the content browser |
| 321 // client. | 311 // client. |
| 322 EXPECT_EQ(1, test_client.call_count()); | 312 EXPECT_EQ(1, test_client.call_count()); |
| 323 EXPECT_EQ(net::CertificateList(), test_client.passed_certs()); | 313 EXPECT_EQ(net::CertificateList(), test_client.passed_certs()); |
| 324 } | 314 } |
| 325 | 315 |
| 326 } // namespace content | 316 } // namespace content |
| OLD | NEW |