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

Side by Side Diff: net/proxy/proxy_service_mojo_unittest.cc

Issue 2416483002: Use std::string instead of mojo::String in //net. (Closed)
Patch Set: Created 4 years, 2 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_resolver_factory_mojo_unittest.cc ('k') | no next file » | 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 fetcher_ = new MockProxyScriptFetcher; 133 fetcher_ = new MockProxyScriptFetcher;
134 proxy_service_ = CreateProxyServiceUsingMojoFactory( 134 proxy_service_ = CreateProxyServiceUsingMojoFactory(
135 this, base::MakeUnique<ProxyConfigServiceFixed>( 135 this, base::MakeUnique<ProxyConfigServiceFixed>(
136 ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl))), 136 ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl))),
137 fetcher_, base::MakeUnique<DoNothingDhcpProxyScriptFetcher>(), 137 fetcher_, base::MakeUnique<DoNothingDhcpProxyScriptFetcher>(),
138 &mock_host_resolver_, &net_log_, &network_delegate_); 138 &mock_host_resolver_, &net_log_, &network_delegate_);
139 } 139 }
140 140
141 std::unique_ptr<base::ScopedClosureRunner> CreateResolver( 141 std::unique_ptr<base::ScopedClosureRunner> CreateResolver(
142 const mojo::String& pac_script, 142 const std::string& pac_script,
143 mojo::InterfaceRequest<interfaces::ProxyResolver> req, 143 mojo::InterfaceRequest<interfaces::ProxyResolver> req,
144 interfaces::ProxyResolverFactoryRequestClientPtr client) override { 144 interfaces::ProxyResolverFactoryRequestClientPtr client) override {
145 InProcessMojoProxyResolverFactory::GetInstance()->CreateResolver( 145 InProcessMojoProxyResolverFactory::GetInstance()->CreateResolver(
146 pac_script, std::move(req), std::move(client)); 146 pac_script, std::move(req), std::move(client));
147 return base::MakeUnique<base::ScopedClosureRunner>( 147 return base::MakeUnique<base::ScopedClosureRunner>(
148 on_delete_closure_.closure()); 148 on_delete_closure_.closure());
149 } 149 }
150 150
151 TestNetworkDelegate network_delegate_; 151 TestNetworkDelegate network_delegate_;
152 LoggingMockHostResolver mock_host_resolver_; 152 LoggingMockHostResolver mock_host_resolver_;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 EXPECT_THAT(callback.WaitForResult(), IsOk()); 258 EXPECT_THAT(callback.WaitForResult(), IsOk());
259 EXPECT_EQ("DIRECT", info.ToPacString()); 259 EXPECT_EQ("DIRECT", info.ToPacString());
260 EXPECT_EQ(0u, mock_host_resolver_.num_resolve()); 260 EXPECT_EQ(0u, mock_host_resolver_.num_resolve());
261 261
262 TestNetLogEntry::List entries; 262 TestNetLogEntry::List entries;
263 net_log_.GetEntries(&entries); 263 net_log_.GetEntries(&entries);
264 CheckCapturedNetLogEntries(entries); 264 CheckCapturedNetLogEntries(entries);
265 } 265 }
266 266
267 } // namespace net 267 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_factory_mojo_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698