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

Side by Side Diff: content/browser/loader/async_revalidation_driver_unittest.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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
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
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
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_quota_client.cc ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698