| OLD | NEW |
| 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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 class ProxyResolverV8Wrapper : public ProxyResolver { | 225 class ProxyResolverV8Wrapper : public ProxyResolver { |
| 226 public: | 226 public: |
| 227 ProxyResolverV8Wrapper(scoped_ptr<ProxyResolverV8> resolver, | 227 ProxyResolverV8Wrapper(scoped_ptr<ProxyResolverV8> resolver, |
| 228 scoped_ptr<MockJSBindings> bindings) | 228 scoped_ptr<MockJSBindings> bindings) |
| 229 : resolver_(resolver.Pass()), bindings_(bindings.Pass()) {} | 229 : resolver_(resolver.Pass()), bindings_(bindings.Pass()) {} |
| 230 | 230 |
| 231 int GetProxyForURL(const GURL& url, | 231 int GetProxyForURL(const GURL& url, |
| 232 ProxyInfo* results, | 232 ProxyInfo* results, |
| 233 const CompletionCallback& /*callback*/, | 233 const CompletionCallback& /*callback*/, |
| 234 RequestHandle* /*request*/, | 234 scoped_ptr<Request>* /*request*/, |
| 235 const BoundNetLog& net_log) override { | 235 const BoundNetLog& net_log) override { |
| 236 return resolver_->GetProxyForURL(url, results, bindings_.get()); | 236 return resolver_->GetProxyForURL(url, results, bindings_.get()); |
| 237 } | 237 } |
| 238 | 238 |
| 239 void CancelRequest(RequestHandle request) override { NOTREACHED(); } | |
| 240 | |
| 241 LoadState GetLoadState(RequestHandle request) const override { | |
| 242 NOTREACHED(); | |
| 243 return LOAD_STATE_IDLE; | |
| 244 } | |
| 245 | |
| 246 private: | 239 private: |
| 247 scoped_ptr<ProxyResolverV8> resolver_; | 240 scoped_ptr<ProxyResolverV8> resolver_; |
| 248 scoped_ptr<MockJSBindings> bindings_; | 241 scoped_ptr<MockJSBindings> bindings_; |
| 249 | 242 |
| 250 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8Wrapper); | 243 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8Wrapper); |
| 251 }; | 244 }; |
| 252 | 245 |
| 253 class ProxyResolverV8Factory : public ProxyResolverFactory { | 246 class ProxyResolverV8Factory : public ProxyResolverFactory { |
| 254 public: | 247 public: |
| 255 ProxyResolverV8Factory() : ProxyResolverFactory(true) {} | 248 ProxyResolverV8Factory() : ProxyResolverFactory(true) {} |
| (...skipping 20 matching lines...) Expand all Loading... |
| 276 TEST(ProxyResolverPerfTest, ProxyResolverV8) { | 269 TEST(ProxyResolverPerfTest, ProxyResolverV8) { |
| 277 base::MessageLoop message_loop; | 270 base::MessageLoop message_loop; |
| 278 ProxyResolverV8Factory factory; | 271 ProxyResolverV8Factory factory; |
| 279 PacPerfSuiteRunner runner(&factory, "ProxyResolverV8"); | 272 PacPerfSuiteRunner runner(&factory, "ProxyResolverV8"); |
| 280 runner.RunAllTests(); | 273 runner.RunAllTests(); |
| 281 } | 274 } |
| 282 | 275 |
| 283 } // namespace | 276 } // namespace |
| 284 | 277 |
| 285 } // namespace net | 278 } // namespace net |
| OLD | NEW |