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

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

Issue 2101943004: content: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase/update Created 4 years, 5 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_manager.h" 5 #include "content/browser/loader/async_revalidation_manager.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 bool IsEmpty() const { return requests_.empty(); } 396 bool IsEmpty() const { return requests_.empty(); }
397 397
398 int OnBeforeURLRequest(net::URLRequest* request, 398 int OnBeforeURLRequest(net::URLRequest* request,
399 const net::CompletionCallback& callback, 399 const net::CompletionCallback& callback,
400 GURL* new_url) override { 400 GURL* new_url) override {
401 requests_.push_back(request); 401 requests_.push_back(request);
402 return TestNetworkDelegate::OnBeforeURLRequest(request, callback, new_url); 402 return TestNetworkDelegate::OnBeforeURLRequest(request, callback, new_url);
403 } 403 }
404 404
405 void OnURLRequestDestroyed(net::URLRequest* request) override { 405 void OnURLRequestDestroyed(net::URLRequest* request) override {
406 for (auto& recorded_request : requests_) { 406 for (auto*& recorded_request : requests_) {
407 if (recorded_request == request) 407 if (recorded_request == request)
408 recorded_request = nullptr; 408 recorded_request = nullptr;
409 } 409 }
410 net::TestNetworkDelegate::OnURLRequestDestroyed(request); 410 net::TestNetworkDelegate::OnURLRequestDestroyed(request);
411 } 411 }
412 412
413 private: 413 private:
414 std::deque<net::URLRequest*> requests_; 414 std::deque<net::URLRequest*> requests_;
415 415
416 DISALLOW_COPY_AND_ASSIGN(URLRequestRecordingNetworkDelegate); 416 DISALLOW_COPY_AND_ASSIGN(URLRequestRecordingNetworkDelegate);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // already completed. 549 // already completed.
550 EXPECT_TRUE(NextRequestWasDestroyed()); 550 EXPECT_TRUE(NextRequestWasDestroyed());
551 551
552 // But no others. 552 // But no others.
553 EXPECT_TRUE(IsEmpty()); 553 EXPECT_TRUE(IsEmpty());
554 } 554 }
555 555
556 } // namespace 556 } // namespace
557 557
558 } // namespace content 558 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/leveldb/leveldb_database.cc ('k') | content/browser/loader/resource_dispatcher_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698