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

Side by Side Diff: components/precache/core/precache_fetcher_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/core/precache_fetcher.h" 5 #include "components/precache/core/precache_fetcher.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher( 60 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher(
61 const GURL& url, net::URLFetcherDelegate* delegate, 61 const GURL& url, net::URLFetcherDelegate* delegate,
62 const std::string& response_data, net::HttpStatusCode response_code, 62 const std::string& response_data, net::HttpStatusCode response_code,
63 net::URLRequestStatus::Status status) { 63 net::URLRequestStatus::Status status) {
64 scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher( 64 scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
65 url, delegate, response_data, response_code, status)); 65 url, delegate, response_data, response_code, status));
66 66
67 total_response_bytes_ += response_data.size(); 67 total_response_bytes_ += response_data.size();
68 requested_urls_.insert(url); 68 requested_urls_.insert(url);
69 69
70 return fetcher.Pass(); 70 return fetcher;
71 } 71 }
72 72
73 const std::multiset<GURL>& requested_urls() const { 73 const std::multiset<GURL>& requested_urls() const {
74 return requested_urls_; 74 return requested_urls_;
75 } 75 }
76 76
77 int total_response_bytes() const { return total_response_bytes_; } 77 int total_response_bytes() const { return total_response_bytes_; }
78 78
79 private: 79 private:
80 // Multiset with one entry for each URL requested. 80 // Multiset with one entry for each URL requested.
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls()); 555 EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls());
556 556
557 EXPECT_TRUE(precache_delegate_.was_on_done_called()); 557 EXPECT_TRUE(precache_delegate_.was_on_done_called());
558 } 558 }
559 559
560 #endif // PRECACHE_MANIFEST_URL_PREFIX 560 #endif // PRECACHE_MANIFEST_URL_PREFIX
561 561
562 } // namespace 562 } // namespace
563 563
564 } // namespace precache 564 } // namespace precache
OLDNEW
« no previous file with comments | « components/precache/core/precache_fetcher.cc ('k') | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698