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

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

Issue 1017453005: Add support for ProxyResolverErrorObserver to ProxyResolverMojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 "net/proxy/proxy_resolver.h"
11 #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"
12 12
13 namespace net { 13 namespace net {
14 class HostResolver; 14 class HostResolver;
15 class ProxyResolverErrorObserver;
15 16
16 class MojoProxyResolverFactoryImpl : public interfaces::ProxyResolverFactory { 17 class MojoProxyResolverFactoryImpl : public interfaces::ProxyResolverFactory {
17 public: 18 public:
18 using Factory = base::Callback<scoped_ptr<ProxyResolver>( 19 using Factory = base::Callback<scoped_ptr<ProxyResolver>(
19 HostResolver*, 20 HostResolver*,
21 scoped_ptr<ProxyResolverErrorObserver>,
20 const ProxyResolver::LoadStateChangedCallback&)>; 22 const ProxyResolver::LoadStateChangedCallback&)>;
21 23
22 explicit MojoProxyResolverFactoryImpl( 24 explicit MojoProxyResolverFactoryImpl(
23 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request); 25 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
24 MojoProxyResolverFactoryImpl( 26 MojoProxyResolverFactoryImpl(
25 const Factory& proxy_resolver_factory, 27 const Factory& proxy_resolver_factory,
26 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request); 28 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
27 29
28 ~MojoProxyResolverFactoryImpl() override; 30 ~MojoProxyResolverFactoryImpl() override;
29 31
30 private: 32 private:
31 // interfaces::ProxyResolverFactory override. 33 // interfaces::ProxyResolverFactory override.
32 void CreateResolver(mojo::InterfaceRequest<interfaces::ProxyResolver> request, 34 void CreateResolver(
33 interfaces::HostResolverPtr host_resolver) override; 35 mojo::InterfaceRequest<interfaces::ProxyResolver> request,
36 interfaces::HostResolverPtr host_resolver,
37 interfaces::ProxyResolverErrorObserverPtr error_observer) override;
34 38
35 const Factory proxy_resolver_impl_factory_; 39 const Factory proxy_resolver_impl_factory_;
36 mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_; 40 mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_;
37 41
38 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverFactoryImpl); 42 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverFactoryImpl);
39 }; 43 };
40 44
41 } // namespace net 45 } // namespace net
42 46
43 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_ 47 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698