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

Unified Diff: net/interfaces/proxy_resolver_service.mojom

Issue 900433003: Add Mojo interfaces for out-of-process proxy resolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove LoadState enum. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/interfaces/host_resolver_service.mojom ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/interfaces/proxy_resolver_service.mojom
diff --git a/net/interfaces/proxy_resolver_service.mojom b/net/interfaces/proxy_resolver_service.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..2cb7a0b7857616bf81c7e028a7f9e3ad9df478da
--- /dev/null
+++ b/net/interfaces/proxy_resolver_service.mojom
@@ -0,0 +1,48 @@
+// 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.
+
+// Put Mojo definitions into their own namespace to avoid collisions with C++
+// definitions.
+// TODO(amistry): Resolve the conflict between these two sets of definitions.
+module net.interfaces;
+
+import "host_resolver_service.mojom";
+
+// Mirror of net::ProxyServer::Scheme.
+enum ProxyScheme {
+ INVALID,
+ DIRECT,
+ HTTP,
+ SOCKS4,
+ SOCKS5,
+ HTTPS,
+ QUIC,
+};
+
+// Mirror of net::ProxyServer.
+struct ProxyServer {
+ ProxyScheme scheme;
+ string host;
+ uint16 port;
+};
+
+interface ProxyResolverService {
+ SetPacScript(string data) => (int32 result);
+
+ // Use a ProxyResolverRequestClient instead of returning a result so we can
+ // receive load state updates and cancel in-flight requests by destroying the
+ // client.
+ // TODO(amistry): Add BoundNetLog.
+ GetProxyForUrl(string url, ProxyResolverRequestClient client);
+};
+
+interface ProxyResolverRequestClient {
+ ReportResult(int32 error, array<ProxyServer>? proxy_servers);
+};
+
+interface ProxyResolverFactory {
+ // TODO(amistry): Add NetLog and ProxyResolverErrorObserver.
+ CreateResolver(ProxyResolverService& resolver,
+ HostResolverService host_resolver);
+};
« no previous file with comments | « net/interfaces/host_resolver_service.mojom ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698