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

Side by Side Diff: net/proxy/proxy_service_mojo_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
« no previous file with comments | « net/proxy/proxy_service_mojo.cc ('k') | net/proxy/proxy_service_v8.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_service_mojo.h" 5 #include "net/proxy/proxy_service_mojo.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility>
9 10
10 #include "base/callback_helpers.h" 11 #include "base/callback_helpers.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "net/base/load_flags.h" 15 #include "net/base/load_flags.h"
15 #include "net/base/network_delegate_impl.h" 16 #include "net/base/network_delegate_impl.h"
16 #include "net/base/test_completion_callback.h" 17 #include "net/base/test_completion_callback.h"
17 #include "net/dns/mock_host_resolver.h" 18 #include "net/dns/mock_host_resolver.h"
18 #include "net/log/net_log.h" 19 #include "net/log/net_log.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl)))), 132 ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl)))),
132 fetcher_, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()), 133 fetcher_, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()),
133 &mock_host_resolver_, &net_log_, &network_delegate_); 134 &mock_host_resolver_, &net_log_, &network_delegate_);
134 } 135 }
135 136
136 scoped_ptr<base::ScopedClosureRunner> CreateResolver( 137 scoped_ptr<base::ScopedClosureRunner> CreateResolver(
137 const mojo::String& pac_script, 138 const mojo::String& pac_script,
138 mojo::InterfaceRequest<interfaces::ProxyResolver> req, 139 mojo::InterfaceRequest<interfaces::ProxyResolver> req,
139 interfaces::ProxyResolverFactoryRequestClientPtr client) override { 140 interfaces::ProxyResolverFactoryRequestClientPtr client) override {
140 InProcessMojoProxyResolverFactory::GetInstance()->CreateResolver( 141 InProcessMojoProxyResolverFactory::GetInstance()->CreateResolver(
141 pac_script, req.Pass(), client.Pass()); 142 pac_script, std::move(req), std::move(client));
142 return make_scoped_ptr( 143 return make_scoped_ptr(
143 new base::ScopedClosureRunner(on_delete_closure_.closure())); 144 new base::ScopedClosureRunner(on_delete_closure_.closure()));
144 } 145 }
145 146
146 TestNetworkDelegate network_delegate_; 147 TestNetworkDelegate network_delegate_;
147 LoggingMockHostResolver mock_host_resolver_; 148 LoggingMockHostResolver mock_host_resolver_;
148 MockProxyScriptFetcher* fetcher_; // Owned by |proxy_service_|. 149 MockProxyScriptFetcher* fetcher_; // Owned by |proxy_service_|.
149 TestNetLog net_log_; 150 TestNetLog net_log_;
150 TestClosure on_delete_closure_; 151 TestClosure on_delete_closure_;
151 scoped_ptr<ProxyService> proxy_service_; 152 scoped_ptr<ProxyService> proxy_service_;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 EXPECT_EQ(OK, callback.WaitForResult()); 254 EXPECT_EQ(OK, callback.WaitForResult());
254 EXPECT_EQ("DIRECT", info.ToPacString()); 255 EXPECT_EQ("DIRECT", info.ToPacString());
255 EXPECT_EQ(0u, mock_host_resolver_.num_resolve()); 256 EXPECT_EQ(0u, mock_host_resolver_.num_resolve());
256 257
257 TestNetLogEntry::List entries; 258 TestNetLogEntry::List entries;
258 net_log_.GetEntries(&entries); 259 net_log_.GetEntries(&entries);
259 CheckCapturedNetLogEntries(entries); 260 CheckCapturedNetLogEntries(entries);
260 } 261 }
261 262
262 } // namespace net 263 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service_mojo.cc ('k') | net/proxy/proxy_service_v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698