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

Unified Diff: chrome/browser/predictors/resource_prefetcher_unittest.cc

Issue 2301403002: predictors: Clean up after removing STLDeleteContainerPairFirstPointers (Closed)
Patch Set: it -> key_value Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/predictors/resource_prefetcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetcher_unittest.cc
diff --git a/chrome/browser/predictors/resource_prefetcher_unittest.cc b/chrome/browser/predictors/resource_prefetcher_unittest.cc
index e1ba98d6d426196d21057d43d7ad66dea3485f21..c2b804b0a1d65a4ab133fff36bf80f9d47707ad9 100644
--- a/chrome/browser/predictors/resource_prefetcher_unittest.cc
+++ b/chrome/browser/predictors/resource_prefetcher_unittest.cc
@@ -106,16 +106,14 @@ class ResourcePrefetcherTest : public testing::Test {
net::URLRequest* GetInFlightRequest(const std::string& url_str) {
GURL url(url_str);
- for (auto it = prefetcher_->request_queue_.begin();
- it != prefetcher_->request_queue_.end(); ++it) {
- EXPECT_NE((*it)->resource_url, url);
+ for (auto* request : prefetcher_->request_queue_) {
+ EXPECT_NE(request->resource_url, url);
}
- for (auto it = prefetcher_->inflight_requests_.begin();
- it != prefetcher_->inflight_requests_.end(); ++it) {
- if (it->first->original_url() == url)
- return it->first;
+ for (const auto& key_value : prefetcher_->inflight_requests_) {
+ if (key_value.first->original_url() == url)
+ return key_value.first;
}
- EXPECT_TRUE(false) << "Inflight request not found: " << url_str;
+ EXPECT_TRUE(false) << "In flight request not found: " << url_str;
return NULL;
}
« no previous file with comments | « chrome/browser/predictors/resource_prefetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698