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

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

Issue 2299963002: Reland "Change ProxyResolver::GetProxyForURL() to take a unique_ptr<Request>* " (Closed)
Patch Set: remove fields proposed by eroman 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_mac.cc ('k') | net/proxy/proxy_resolver_v8_tracing.h » ('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 <utility> 5 #include <utility>
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 class ProxyResolverV8Wrapper : public ProxyResolver { 233 class ProxyResolverV8Wrapper : public ProxyResolver {
234 public: 234 public:
235 ProxyResolverV8Wrapper(std::unique_ptr<ProxyResolverV8> resolver, 235 ProxyResolverV8Wrapper(std::unique_ptr<ProxyResolverV8> resolver,
236 std::unique_ptr<MockJSBindings> bindings) 236 std::unique_ptr<MockJSBindings> bindings)
237 : resolver_(std::move(resolver)), bindings_(std::move(bindings)) {} 237 : resolver_(std::move(resolver)), bindings_(std::move(bindings)) {}
238 238
239 int GetProxyForURL(const GURL& url, 239 int GetProxyForURL(const GURL& url,
240 ProxyInfo* results, 240 ProxyInfo* results,
241 const CompletionCallback& /*callback*/, 241 const CompletionCallback& /*callback*/,
242 RequestHandle* /*request*/, 242 std::unique_ptr<Request>* /*request*/,
243 const NetLogWithSource& net_log) override { 243 const NetLogWithSource& net_log) override {
244 return resolver_->GetProxyForURL(url, results, bindings_.get()); 244 return resolver_->GetProxyForURL(url, results, bindings_.get());
245 } 245 }
246 246
247 void CancelRequest(RequestHandle request) override { NOTREACHED(); }
248
249 LoadState GetLoadState(RequestHandle request) const override {
250 NOTREACHED();
251 return LOAD_STATE_IDLE;
252 }
253
254 private: 247 private:
255 std::unique_ptr<ProxyResolverV8> resolver_; 248 std::unique_ptr<ProxyResolverV8> resolver_;
256 std::unique_ptr<MockJSBindings> bindings_; 249 std::unique_ptr<MockJSBindings> bindings_;
257 250
258 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8Wrapper); 251 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8Wrapper);
259 }; 252 };
260 253
261 class ProxyResolverV8Factory : public ProxyResolverFactory { 254 class ProxyResolverV8Factory : public ProxyResolverFactory {
262 public: 255 public:
263 ProxyResolverV8Factory() : ProxyResolverFactory(true) {} 256 ProxyResolverV8Factory() : ProxyResolverFactory(true) {}
(...skipping 20 matching lines...) Expand all
284 TEST(ProxyResolverPerfTest, ProxyResolverV8) { 277 TEST(ProxyResolverPerfTest, ProxyResolverV8) {
285 base::MessageLoop message_loop; 278 base::MessageLoop message_loop;
286 ProxyResolverV8Factory factory; 279 ProxyResolverV8Factory factory;
287 PacPerfSuiteRunner runner(&factory, "ProxyResolverV8"); 280 PacPerfSuiteRunner runner(&factory, "ProxyResolverV8");
288 runner.RunAllTests(); 281 runner.RunAllTests();
289 } 282 }
290 283
291 } // namespace 284 } // namespace
292 285
293 } // namespace net 286 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_mac.cc ('k') | net/proxy/proxy_resolver_v8_tracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698