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

Unified Diff: net/proxy/mojo_proxy_resolver_factory.h

Issue 1076083002: Shut down proxy resolver utility processes when no longer needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-service-with-factory-restart
Patch Set: Created 5 years, 8 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/proxy/in_process_mojo_proxy_resolver_factory.cc ('k') | net/proxy/proxy_resolver_mojo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/mojo_proxy_resolver_factory.h
diff --git a/net/proxy/mojo_proxy_resolver_factory.h b/net/proxy/mojo_proxy_resolver_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..a27b81a1d0a420967f0fe7024ceae90a56df9cd8
--- /dev/null
+++ b/net/proxy/mojo_proxy_resolver_factory.h
@@ -0,0 +1,35 @@
+// 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.
+
+#ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
+#define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
+
+#include "base/callback_helpers.h"
+#include "base/memory/scoped_ptr.h"
+#include "net/interfaces/host_resolver_service.mojom.h"
+#include "net/interfaces/proxy_resolver_service.mojom.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
+
+namespace net {
+
+// Factory for connecting to Mojo ProxyResolver services.
+class MojoProxyResolverFactory {
+ public:
+ // Connect to a new ProxyResolver service using request |req|, using
+ // |host_resolver| as the DNS resolver. The return value should be released
+ // when the connection to |req| is no longer needed.
+ // Note: The connection request |req| may be resolved asynchronously.
+ virtual scoped_ptr<base::ScopedClosureRunner> CreateResolver(
+ const mojo::String& pac_script,
+ mojo::InterfaceRequest<interfaces::ProxyResolver> req,
+ interfaces::HostResolverPtr host_resolver,
+ interfaces::ProxyResolverFactoryRequestClientPtr client) = 0;
+
+ protected:
+ virtual ~MojoProxyResolverFactory() = default;
+};
+
+} // namespace net
+
+#endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
« no previous file with comments | « net/proxy/in_process_mojo_proxy_resolver_factory.cc ('k') | net/proxy/proxy_resolver_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698