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

Side by Side Diff: net/url_request/sdch_dictionary_fetcher_unittest.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "net/url_request/sdch_dictionary_fetcher.h" 5 #include "net/url_request/sdch_dictionary_fetcher.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/run_loop.h" 15 #include "base/run_loop.h"
15 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
16 #include "base/thread_task_runner_handle.h" 17 #include "base/thread_task_runner_handle.h"
17 #include "net/base/load_flags.h" 18 #include "net/base/load_flags.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 118
118 // The caller must ensure that both |*http_response_info| and the 119 // The caller must ensure that both |*http_response_info| and the
119 // callback remain valid for the lifetime of the 120 // callback remain valid for the lifetime of the
120 // SpecifiedResponseJobInterceptor (i.e. until Unregister() is called). 121 // SpecifiedResponseJobInterceptor (i.e. until Unregister() is called).
121 static void RegisterWithFilter(HttpResponseInfo* http_response_info, 122 static void RegisterWithFilter(HttpResponseInfo* http_response_info,
122 const LifecycleCallback& lifecycle_callback) { 123 const LifecycleCallback& lifecycle_callback) {
123 scoped_ptr<SpecifiedResponseJobInterceptor> interceptor( 124 scoped_ptr<SpecifiedResponseJobInterceptor> interceptor(
124 new SpecifiedResponseJobInterceptor(http_response_info, 125 new SpecifiedResponseJobInterceptor(http_response_info,
125 lifecycle_callback)); 126 lifecycle_callback));
126 127
127 URLRequestFilter::GetInstance()->AddHostnameInterceptor("http", kTestDomain, 128 URLRequestFilter::GetInstance()->AddHostnameInterceptor(
128 interceptor.Pass()); 129 "http", kTestDomain, std::move(interceptor));
129 } 130 }
130 131
131 static void Unregister() { 132 static void Unregister() {
132 URLRequestFilter::GetInstance()->RemoveHostnameHandler("http", kTestDomain); 133 URLRequestFilter::GetInstance()->RemoveHostnameHandler("http", kTestDomain);
133 } 134 }
134 135
135 private: 136 private:
136 HttpResponseInfo* http_response_info_; 137 HttpResponseInfo* http_response_info_;
137 LifecycleCallback lifecycle_callback_; 138 LifecycleCallback lifecycle_callback_;
138 DISALLOW_COPY_AND_ASSIGN(SpecifiedResponseJobInterceptor); 139 DISALLOW_COPY_AND_ASSIGN(SpecifiedResponseJobInterceptor);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 WaitForNoJobs(); 430 WaitForNoJobs();
430 EXPECT_TRUE(fetcher()->Schedule(dictionary_url, GetDefaultCallback())); 431 EXPECT_TRUE(fetcher()->Schedule(dictionary_url, GetDefaultCallback()));
431 432
432 WaitForNoJobs(); 433 WaitForNoJobs();
433 EXPECT_EQ(2, jobs_requested()); 434 EXPECT_EQ(2, jobs_requested());
434 } 435 }
435 436
436 } // namespace 437 } // namespace
437 438
438 } // namespace net 439 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/certificate_report_sender.cc ('k') | net/url_request/test_url_fetcher_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698