OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/async_revalidation_driver.h" | 5 #include "content/browser/loader/async_revalidation_driver.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <type_traits> | 8 #include <type_traits> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 : net::URLRequestTestJob(request, network_delegate, true), | 226 : net::URLRequestTestJob(request, network_delegate, true), |
227 weak_factory_(this) {} | 227 weak_factory_(this) {} |
228 | 228 |
229 // net::URLRequestTestJob implementation: | 229 // net::URLRequestTestJob implementation: |
230 void Start() override { | 230 void Start() override { |
231 scoped_refptr<net::SSLCertRequestInfo> cert_request_info( | 231 scoped_refptr<net::SSLCertRequestInfo> cert_request_info( |
232 new net::SSLCertRequestInfo); | 232 new net::SSLCertRequestInfo); |
233 base::ThreadTaskRunnerHandle::Get()->PostTask( | 233 base::ThreadTaskRunnerHandle::Get()->PostTask( |
234 FROM_HERE, | 234 FROM_HERE, |
235 base::Bind(&MockClientCertURLRequestJob::NotifyCertificateRequested, | 235 base::Bind(&MockClientCertURLRequestJob::NotifyCertificateRequested, |
236 weak_factory_.GetWeakPtr(), cert_request_info)); | 236 weak_factory_.GetWeakPtr(), |
| 237 base::RetainedRef(cert_request_info))); |
237 } | 238 } |
238 | 239 |
239 void ContinueWithCertificate( | 240 void ContinueWithCertificate( |
240 net::X509Certificate* cert, | 241 net::X509Certificate* cert, |
241 net::SSLPrivateKey* client_private_key) override { | 242 net::SSLPrivateKey* client_private_key) override { |
242 ADD_FAILURE() << "Certificate supplied."; | 243 ADD_FAILURE() << "Certificate supplied."; |
243 } | 244 } |
244 | 245 |
245 void Kill() override { | 246 void Kill() override { |
246 weak_factory_.InvalidateWeakPtrs(); | 247 weak_factory_.InvalidateWeakPtrs(); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 TEST_F(AsyncRevalidationDriverFromCacheTest, | 389 TEST_F(AsyncRevalidationDriverFromCacheTest, |
389 CacheNotReadOnSuccessfulRevalidation) { | 390 CacheNotReadOnSuccessfulRevalidation) { |
390 driver_->StartRequest(); | 391 driver_->StartRequest(); |
391 base::RunLoop().RunUntilIdle(); | 392 base::RunLoop().RunUntilIdle(); |
392 | 393 |
393 EXPECT_TRUE(async_revalidation_complete_called()); | 394 EXPECT_TRUE(async_revalidation_complete_called()); |
394 } | 395 } |
395 | 396 |
396 } // namespace | 397 } // namespace |
397 } // namespace content | 398 } // namespace content |
OLD | NEW |