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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl_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, 11 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
« no previous file with comments | « net/proxy/proxy_script_decider.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility>
8 9
9 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/path_service.h" 13 #include "base/path_service.h"
13 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
14 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
15 #include "base/thread_task_runner_handle.h" 16 #include "base/thread_task_runner_handle.h"
16 #include "net/base/filename_util.h" 17 #include "net/base/filename_util.h"
17 #include "net/base/load_flags.h" 18 #include "net/base/load_flags.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 storage_.set_http_transaction_factory(make_scoped_ptr( 83 storage_.set_http_transaction_factory(make_scoped_ptr(
83 new HttpCache(storage_.http_network_session(), 84 new HttpCache(storage_.http_network_session(),
84 HttpCache::DefaultBackend::InMemory(0), false))); 85 HttpCache::DefaultBackend::InMemory(0), false)));
85 scoped_ptr<URLRequestJobFactoryImpl> job_factory = 86 scoped_ptr<URLRequestJobFactoryImpl> job_factory =
86 make_scoped_ptr(new URLRequestJobFactoryImpl()); 87 make_scoped_ptr(new URLRequestJobFactoryImpl());
87 #if !defined(DISABLE_FILE_SUPPORT) 88 #if !defined(DISABLE_FILE_SUPPORT)
88 job_factory->SetProtocolHandler("file", 89 job_factory->SetProtocolHandler("file",
89 make_scoped_ptr(new FileProtocolHandler( 90 make_scoped_ptr(new FileProtocolHandler(
90 base::ThreadTaskRunnerHandle::Get()))); 91 base::ThreadTaskRunnerHandle::Get())));
91 #endif 92 #endif
92 storage_.set_job_factory(job_factory.Pass()); 93 storage_.set_job_factory(std::move(job_factory));
93 } 94 }
94 95
95 ~RequestContext() override { AssertNoURLRequests(); } 96 ~RequestContext() override { AssertNoURLRequests(); }
96 97
97 private: 98 private:
98 URLRequestContextStorage storage_; 99 URLRequestContextStorage storage_;
99 }; 100 };
100 101
101 #if !defined(DISABLE_FILE_SUPPORT) 102 #if !defined(DISABLE_FILE_SUPPORT)
102 // Get a file:// url relative to net/data/proxy/proxy_script_fetcher_unittest. 103 // Get a file:// url relative to net/data/proxy/proxy_script_fetcher_unittest.
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 base::string16 text; 477 base::string16 text;
477 TestCompletionCallback callback; 478 TestCompletionCallback callback;
478 int result = pac_fetcher.Fetch(url, &text, callback.callback()); 479 int result = pac_fetcher.Fetch(url, &text, callback.callback());
479 EXPECT_EQ(ERR_FAILED, result); 480 EXPECT_EQ(ERR_FAILED, result);
480 } 481 }
481 } 482 }
482 483
483 } // namespace 484 } // namespace
484 485
485 } // namespace net 486 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_decider.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698