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

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

Issue 10874077: net: Add a new target 'net_with_v8'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fuck win - I hate you Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/proxy/proxy_service_v8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
11 namespace net {
12
13 class DhcpProxyScriptFetcher;
14 class HostResolver;
15 class NetLog;
16 class NetworkDelegate;
17 class ProxyConfigService;
18 class ProxyScriptFetcher;
19 class 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 // |num_pac_threads| specifies the maximum number of threads to use for
25 // executing PAC scripts. Threads are created lazily on demand.
26 // If |0| is specified, then a default number of threads will be selected.
27 //
28 // Having more threads avoids stalling proxy resolve requests when the
29 // PAC script takes a while to run. This is particularly a problem when PAC
30 // scripts do synchronous DNS resolutions, since that can take on the order
31 // of seconds.
32 //
33 // However, the disadvantages of using more than 1 thread are:
34 // (a) can cause compatibility issues for scripts that rely on side effects
35 // between runs (such scripts should not be common though).
36 // (b) increases the memory used by proxy resolving, as each thread will
37 // duplicate its own script context.
38
39 // |proxy_script_fetcher| specifies the dependency to use for downloading
40 // any PAC scripts. The resulting ProxyService will take ownership of it.
41 //
42 // |dhcp_proxy_script_fetcher| specifies the dependency to use for attempting
43 // to retrieve the most appropriate PAC script configured in DHCP. The
44 // resulting ProxyService will take ownership of it.
45 //
46 // |host_resolver| points to the host resolving dependency the PAC script
47 // should use for any DNS queries. It must remain valid throughout the
48 // lifetime of the ProxyService.
49 //
50 // ##########################################################################
51 // # See the warnings in net/proxy/proxy_resolver_v8.h describing the
52 // # multi-threading model. In order for this to be safe to use, *ALL* the
53 // # other V8's running in the process must use v8::Locker.
54 // ##########################################################################
55 NET_EXPORT ProxyService* CreateProxyServiceUsingV8ProxyResolver(
56 ProxyConfigService* proxy_config_service,
57 size_t num_pac_threads,
58 ProxyScriptFetcher* proxy_script_fetcher,
59 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
60 HostResolver* host_resolver,
61 NetLog* net_log,
62 NetworkDelegate* network_delegate);
63
64 } // namespace net
65
66 #endif // NET_PROXY_PROXY_SERVICE_V8_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/proxy/proxy_service_v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698