Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_ | |
| 6 #define NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_ | |
| 7 | |
| 8 #include <set> | |
| 9 | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "net/interfaces/proxy_resolver_service.mojom.h" | |
| 12 | |
| 13 namespace net { | |
| 14 | |
| 15 class ProxyResolver; | |
| 16 | |
| 17 class MojoProxyResolverImpl : public interfaces::ProxyResolver { | |
| 18 public: | |
| 19 explicit MojoProxyResolverImpl(scoped_ptr<net::ProxyResolver> resolver); | |
| 20 | |
| 21 ~MojoProxyResolverImpl() override; | |
| 22 | |
| 23 private: | |
| 24 class Job; | |
| 25 | |
| 26 // interfaces::ProxyResolver overrides. | |
| 27 void SetPacScript(const mojo::String& data, | |
| 28 const mojo::Callback<void(int32_t)>& callback) override; | |
| 29 void GetProxyForUrl( | |
| 30 const mojo::String& url, | |
| 31 interfaces::ProxyResolverRequestClientPtr client) override; | |
| 32 | |
| 33 void DeleteJob(Job* job); | |
| 34 | |
| 35 void SetPacScriptDone(int result); | |
| 36 | |
| 37 scoped_ptr<net::ProxyResolver> resolver_; | |
| 38 std::set<Job*> resolve_jobs_; | |
| 39 | |
| 40 mojo::Callback<void(int32_t)> set_pac_script_callback_; | |
|
eroman
2015/02/12 22:51:30
int32_t --> int
Sam McNally
2015/02/13 00:03:19
This is a callback to the mojo interface, so I thi
| |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverImpl); | |
| 43 }; | |
| 44 | |
| 45 } // namespace net | |
| 46 | |
| 47 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_ | |
| OLD | NEW |