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..989494ed438e60d62d1f1e8d6601e727444df6c6 |
--- /dev/null |
+++ b/net/interfaces/proxy_resolver_service.mojom |
@@ -0,0 +1,43 @@ |
+// 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"; |
+ |
+// Partial mirror of net::LoadState. Only contains values possible by the |
+// proxy resolver. |
+enum LoadState { |
+ RESOLVING_PROXY_FOR_URL, |
+ RESOLVING_HOST_IN_PROXY_SCRIPT, |
+}; |
+ |
+interface ProxyResolverService { |
+ SetPacScript(string data) => (int32 result); |
+ |
+ // Use a ProxyResolveRequestClient instead of returning a result so we can |
eroman
2015/02/03 04:53:29
I see, you are using "ResolveClient" throughout.
Anand Mistry (off Chromium)
2015/02/03 06:27:22
Changed to "Resolver" everywhere. I agree it's bet
|
+ // receive load state updates and cancel in-flight requests by destroying the |
+ // client. |
+ // TODO(amistry): Add BoundNetLog. |
+ GetProxyForUrl(string url, ProxyResolveRequestClient client); |
+}; |
+ |
+interface ProxyResolveRequestClient { |
+ ReportResult(int32 error, string? pac_string); |
eroman
2015/02/03 04:53:29
I can certainly understand wanting to return a PAC
Anand Mistry (off Chromium)
2015/02/03 06:27:22
Looks straight forward. Might as well change it ri
|
+ UpdateLoadState(LoadState load_state); |
eroman
2015/02/03 04:53:29
Can you give some details on how this will work?
Anand Mistry (off Chromium)
2015/02/03 06:27:22
So, I had an explanation on how this would work...
Sam McNally
2015/02/03 23:51:30
I think we should punt on LoadState for now.
eroman
2015/02/04 01:25:20
Agreed (punt on LoadState for now), it can return
|
+}; |
+ |
+interface ProxyResolverErrorObserver { |
+ OnPacScriptError(int32 line_number, string error); |
+}; |
+ |
+interface ProxyResolverFactory { |
+ // TODO(amistry): Add NetLog. |
+ CreateResolver(ProxyResolverService& resolver, |
eroman
2015/02/03 04:53:29
Forgive me for not being familiar with mojo (yet!)
Anand Mistry (off Chromium)
2015/02/03 06:27:22
There are two ends to an interface, the client (ca
|
+ HostResolverService host_resolver, |
+ ProxyResolverErrorObserver error_observer); |
+}; |