1// Copyright (c) 2012 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_SERVICE_V8_H_ 6#define NET_PROXY_PROXY_SERVICE_V8_H_ 7 8#include "base/basictypes.h" 9#include "net/base/net_export.h" 10 11namespace net { 12 13class DhcpProxyScriptFetcher; 14class HostResolver; 15class NetLog; 16class NetworkDelegate; 17class ProxyConfigService; 18class ProxyScriptFetcher; 19class ProxyService; 20 21// Creates a proxy service that polls |proxy_config_service| to notice when 22// the proxy settings change. We take ownership of |proxy_config_service|. 23// 24// |proxy_script_fetcher| specifies the dependency to use for downloading 25// any PAC scripts. The resulting ProxyService will take ownership of it. 26// 27// |dhcp_proxy_script_fetcher| specifies the dependency to use for attempting 28// to retrieve the most appropriate PAC script configured in DHCP. The 29// resulting ProxyService will take ownership of it. 30// 31// |host_resolver| points to the host resolving dependency the PAC script 32// should use for any DNS queries. It must remain valid throughout the 33// lifetime of the ProxyService. 34// 35// ########################################################################## 36// # See the warnings in net/proxy/proxy_resolver_v8.h describing the 37// # multi-threading model. In order for this to be safe to use, *ALL* the 38// # other V8's running in the process must use v8::Locker. 39// ########################################################################## 40NET_EXPORT ProxyService* CreateProxyServiceUsingV8ProxyResolver( 41 ProxyConfigService* proxy_config_service, 42 ProxyScriptFetcher* proxy_script_fetcher, 43 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, 44 HostResolver* host_resolver, 45 NetLog* net_log, 46 NetworkDelegate* network_delegate); 47 48} // namespace net 49 50#endif // NET_PROXY_PROXY_SERVICE_V8_H_ 51