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

Side by Side Diff: components/precache/content/precache_manager_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/precache/content/precache_manager.h" 5 #include "components/precache/content/precache_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class TestURLFetcherCallback { 53 class TestURLFetcherCallback {
54 public: 54 public:
55 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher( 55 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher(
56 const GURL& url, net::URLFetcherDelegate* delegate, 56 const GURL& url, net::URLFetcherDelegate* delegate,
57 const std::string& response_data, net::HttpStatusCode response_code, 57 const std::string& response_data, net::HttpStatusCode response_code,
58 net::URLRequestStatus::Status status) { 58 net::URLRequestStatus::Status status) {
59 scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher( 59 scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
60 url, delegate, response_data, response_code, status)); 60 url, delegate, response_data, response_code, status));
61 61
62 requested_urls_.insert(url); 62 requested_urls_.insert(url);
63 return fetcher.Pass(); 63 return fetcher;
64 } 64 }
65 65
66 const std::multiset<GURL>& requested_urls() const { 66 const std::multiset<GURL>& requested_urls() const {
67 return requested_urls_; 67 return requested_urls_;
68 } 68 }
69 69
70 private: 70 private:
71 // Multiset with one entry for each URL requested. 71 // Multiset with one entry for each URL requested.
72 std::multiset<GURL> requested_urls_; 72 std::multiset<GURL> requested_urls_;
73 }; 73 };
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 expected_histogram_count_map["Precache.Saved"] += 2; 426 expected_histogram_count_map["Precache.Saved"] += 2;
427 427
428 base::MessageLoop::current()->RunUntilIdle(); 428 base::MessageLoop::current()->RunUntilIdle();
429 EXPECT_THAT(histograms_.GetTotalCountsForPrefix("Precache."), 429 EXPECT_THAT(histograms_.GetTotalCountsForPrefix("Precache."),
430 ContainerEq(expected_histogram_count_map)); 430 ContainerEq(expected_histogram_count_map));
431 } 431 }
432 432
433 } // namespace 433 } // namespace
434 434
435 } // namespace precache 435 } // namespace precache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698