 Chromium Code Reviews
 Chromium Code Reviews Issue 896203003:
  Implement utility-side proxy resolver Mojo service.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-diffbase
    
  
    Issue 896203003:
  Implement utility-side proxy resolver Mojo service.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-diffbase| Index: net/proxy/mojo_proxy_resolver_impl.h | 
| diff --git a/net/proxy/mojo_proxy_resolver_impl.h b/net/proxy/mojo_proxy_resolver_impl.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..007655a14be2e0ae7f6e2a9097d02b2de173ea79 | 
| --- /dev/null | 
| +++ b/net/proxy/mojo_proxy_resolver_impl.h | 
| @@ -0,0 +1,47 @@ | 
| +// Copyright 2015 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_ | 
| +#define NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_ | 
| + | 
| +#include <set> | 
| + | 
| +#include "base/memory/scoped_ptr.h" | 
| +#include "net/interfaces/proxy_resolver_service.mojom.h" | 
| + | 
| +namespace net { | 
| + | 
| +class ProxyResolver; | 
| + | 
| +class MojoProxyResolverImpl : public interfaces::ProxyResolver { | 
| + public: | 
| + explicit MojoProxyResolverImpl(scoped_ptr<net::ProxyResolver> resolver); | 
| + | 
| + ~MojoProxyResolverImpl() override; | 
| + | 
| + private: | 
| + class Job; | 
| + | 
| + // interfaces::ProxyResolver overrides. | 
| + void SetPacScript(const mojo::String& data, | 
| + const mojo::Callback<void(int32_t)>& callback) override; | 
| + void GetProxyForUrl( | 
| + const mojo::String& url, | 
| + interfaces::ProxyResolverRequestClientPtr client) override; | 
| + | 
| + void DeleteJob(Job* job); | 
| + | 
| + void SetPacScriptDone(int result); | 
| + | 
| + scoped_ptr<net::ProxyResolver> resolver_; | 
| + std::set<Job*> resolve_jobs_; | 
| + | 
| + 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
 | 
| + | 
| + DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverImpl); | 
| +}; | 
| + | 
| +} // namespace net | 
| + | 
| +#endif // NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_ |