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

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

Issue 862813002: WIP: Prototype OOP V8 PAC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Slight cleanup and report JS memory usage. Created 5 years, 10 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
« no previous file with comments | « net/proxy/proxy_resolver_mojo.cc ('k') | net/proxy/proxy_resolver_mojo_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_PROXY_RESOLVER_MOJO_HOST_H_
6 #define NET_PROXY_PROXY_RESOLVER_MOJO_HOST_H_
7
8 #include "base/logging.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/strings/string16.h"
11 #include "mojo/public/cpp/bindings/interface_impl.h"
12 #include "net/base/completion_callback.h"
13 #include "net/base/load_states.h"
14 #include "net/base/net_export.h"
15 #include "net/proxy/proxy_resolver.mojom.h"
16 #include "net/proxy/proxy_resolver_script_data.h"
17 #include "url/gurl.h"
18
19 namespace net {
20
21 class BoundNetLog;
22 class HostResolverMojo;
23 class NetLog;
24 class ProxyInfo;
25 class ProxyResolver;
26 class ProxyResolverErrorObserverMojo;
27
28 class NET_EXPORT_PRIVATE ProxyResolverMojoHost
29 : public mojo::InterfaceImpl<proxy::Resolver> {
30 public:
31 ProxyResolverMojoHost(scoped_ptr<ProxyResolver> resolver,
32 scoped_ptr<HostResolverMojo> host_resolver);
33
34 ~ProxyResolverMojoHost() override;
35
36 ProxyResolver* resolver() { return resolver_.get(); }
37
38 private:
39 void SetPacScript(const mojo::String& data,
40 proxy::SetPacScriptClientPtr client) override;
41 void GetProxyForUrl(const mojo::String& url,
42 proxy::ResolveRequestClientPtr client) override;
43
44 scoped_ptr<ProxyResolver> resolver_;
45 scoped_ptr<HostResolverMojo> host_resolver_;
46
47 base::WeakPtrFactory<ProxyResolverMojoHost> weak_factory_;
48
49 DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojoHost);
50 };
51
52 class NET_EXPORT ProxyResolverMojoFactory
53 : public mojo::InterfaceImpl<proxy::ResolverFactory> {
54 public:
55 explicit ProxyResolverMojoFactory(NetLog* net_log);
56
57 ~ProxyResolverMojoFactory() override;
58
59 private:
60 void CreateResolver(mojo::InterfaceRequest<proxy::Resolver> resolver,
61 dns::ResolverPtr host_resolver_handle,
62 proxy::ErrorObserverPtr error_observer_handle) override;
63
64 NetLog* net_log_;
65
66 DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojoFactory);
67 };
68
69 } // namespace net
70
71 #endif // NET_PROXY_PROXY_RESOLVER_MOJO_HOST_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_mojo.cc ('k') | net/proxy/proxy_resolver_mojo_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698