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

Side by Side Diff: net/proxy/mojo_proxy_resolver_factory_impl.h

Issue 939503004: Add LoadState reporting to the mojo proxy resolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-resolver-mojo
Patch Set: rebase Created 5 years, 9 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
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 #ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_ 5 #ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_
6 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_ 6 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "net/interfaces/proxy_resolver_service.mojom.h" 9 #include "net/interfaces/proxy_resolver_service.mojom.h"
10 #include "net/proxy/proxy_resolver.h"
10 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
11 12
12 namespace net { 13 namespace net {
13 class HostResolver; 14 class HostResolver;
14 class ProxyResolver;
15 15
16 class MojoProxyResolverFactoryImpl : public interfaces::ProxyResolverFactory { 16 class MojoProxyResolverFactoryImpl : public interfaces::ProxyResolverFactory {
17 public: 17 public:
18 using Factory = base::Callback<scoped_ptr<ProxyResolver>(HostResolver*)>; 18 using Factory = base::Callback<scoped_ptr<ProxyResolver>(
19 HostResolver*,
20 const ProxyResolver::LoadStateChangedCallback&)>;
19 21
20 explicit MojoProxyResolverFactoryImpl( 22 explicit MojoProxyResolverFactoryImpl(
21 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request); 23 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
22 MojoProxyResolverFactoryImpl( 24 MojoProxyResolverFactoryImpl(
23 const Factory& proxy_resolver_factory, 25 const Factory& proxy_resolver_factory,
24 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request); 26 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
25 27
26 ~MojoProxyResolverFactoryImpl() override; 28 ~MojoProxyResolverFactoryImpl() override;
27 29
28 private: 30 private:
29 // interfaces::ProxyResolverFactory override. 31 // interfaces::ProxyResolverFactory override.
30 void CreateResolver(mojo::InterfaceRequest<interfaces::ProxyResolver> request, 32 void CreateResolver(mojo::InterfaceRequest<interfaces::ProxyResolver> request,
31 interfaces::HostResolverPtr host_resolver) override; 33 interfaces::HostResolverPtr host_resolver) override;
32 34
33 const Factory proxy_resolver_impl_factory_; 35 const Factory proxy_resolver_impl_factory_;
34 mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_; 36 mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_;
35 37
36 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverFactoryImpl); 38 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverFactoryImpl);
37 }; 39 };
38 40
39 } // namespace net 41 } // namespace net
40 42
41 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_ 43 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « net/interfaces/proxy_resolver_service.mojom ('k') | net/proxy/mojo_proxy_resolver_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698