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

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

Issue 896203003: Implement utility-side proxy resolver Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-diffbase
Patch Set: Use net::Error 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
(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 <queue>
9 #include <set>
10
11 #include "base/memory/scoped_ptr.h"
12 #include "net/interfaces/proxy_resolver_service.mojom.h"
13
14 namespace net {
15
16 class ProxyResolver;
17
18 class MojoProxyResolverImpl : public interfaces::ProxyResolver {
19 public:
20 explicit MojoProxyResolverImpl(scoped_ptr<net::ProxyResolver> resolver);
21
22 ~MojoProxyResolverImpl() override;
23
24 private:
25 class Job;
26 struct SetPacScriptRequest;
27
28 // interfaces::ProxyResolver overrides.
29 void SetPacScript(const mojo::String& data,
30 const mojo::Callback<void(int32_t)>& callback) override;
31 void GetProxyForUrl(
32 const mojo::String& url,
33 interfaces::ProxyResolverRequestClientPtr client) override;
34
35 void DeleteJob(Job* job);
36
37 void StartSetPacScript();
38 void SetPacScriptDone(int result);
39
40 scoped_ptr<net::ProxyResolver> resolver_;
41 std::set<Job*> resolve_jobs_;
42
43 std::queue<SetPacScriptRequest> set_pac_script_requests_;
44
45 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverImpl);
46 };
47
48 } // namespace net
49
50 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698