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

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

Issue 115029: Making command-line specified proxy settings more flexible - allowing for set... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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_script_fetcher_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_PROXY_PROXY_SERVICE_H_ 5 #ifndef NET_PROXY_PROXY_SERVICE_H_
6 #define NET_PROXY_PROXY_SERVICE_H_ 6 #define NET_PROXY_PROXY_SERVICE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 PacRequest** pac_request); 79 PacRequest** pac_request);
80 80
81 // Call this method with a non-null |pac_request| to cancel the PAC request. 81 // Call this method with a non-null |pac_request| to cancel the PAC request.
82 void CancelPacRequest(PacRequest* pac_request); 82 void CancelPacRequest(PacRequest* pac_request);
83 83
84 // Sets the ProxyScriptFetcher dependency. This is needed if the ProxyResolver 84 // Sets the ProxyScriptFetcher dependency. This is needed if the ProxyResolver
85 // is of type ProxyResolverWithoutFetch. ProxyService takes ownership of 85 // is of type ProxyResolverWithoutFetch. ProxyService takes ownership of
86 // |proxy_script_fetcher|. 86 // |proxy_script_fetcher|.
87 void SetProxyScriptFetcher(ProxyScriptFetcher* proxy_script_fetcher); 87 void SetProxyScriptFetcher(ProxyScriptFetcher* proxy_script_fetcher);
88 88
89 // Creates a proxy service using the specified settings. If |pi| is NULL then 89 // Creates a proxy service using the specified settings. If |pc| is NULL then
90 // the system's default proxy settings will be used (on Windows this will 90 // the system's default proxy settings will be used (on Windows this will
91 // use IE's settings). 91 // use IE's settings).
92 static ProxyService* Create(const ProxyInfo* pi); 92 static ProxyService* Create(const ProxyConfig* pc);
93 93
94 // Creates a proxy service using the specified settings. If |pi| is NULL then 94 // Creates a proxy service using the specified settings. If |pc| is NULL then
95 // the system's default proxy settings will be used. This is basically the 95 // the system's default proxy settings will be used. This is basically the
96 // same as Create(const ProxyInfo*), however under the hood it uses a 96 // same as Create(const ProxyConfig*), however under the hood it uses a
97 // different implementation (V8). |url_request_context| is the URL request 97 // different implementation (V8). |url_request_context| is the URL request
98 // context that will be used if a PAC script needs to be fetched. 98 // context that will be used if a PAC script needs to be fetched.
99 // ########################################################################## 99 // ##########################################################################
100 // # See the warnings in net/proxy/proxy_resolver_v8.h describing the 100 // # See the warnings in net/proxy/proxy_resolver_v8.h describing the
101 // # multi-threading model. In order for this to be safe to use, *ALL* the 101 // # multi-threading model. In order for this to be safe to use, *ALL* the
102 // # other V8's running in the process must use v8::Locker. 102 // # other V8's running in the process must use v8::Locker.
103 // ########################################################################## 103 // ##########################################################################
104 static ProxyService* CreateUsingV8Resolver( 104 static ProxyService* CreateUsingV8Resolver(
105 const ProxyInfo* pi, 105 const ProxyConfig* pc,
106 URLRequestContext* url_request_context); 106 URLRequestContext* url_request_context);
107 107
108 // Creates a proxy service that always fails to fetch the proxy configuration, 108 // Creates a proxy service that always fails to fetch the proxy configuration,
109 // so it falls back to direct connect. 109 // so it falls back to direct connect.
110 static ProxyService* CreateNull(); 110 static ProxyService* CreateNull();
111 111
112 private: 112 private:
113 friend class PacRequest; 113 friend class PacRequest;
114 114
115 ProxyResolver* resolver() { return resolver_.get(); } 115 ProxyResolver* resolver() { return resolver_.get(); }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 base::WaitableEvent event_; 249 base::WaitableEvent event_;
250 CompletionCallbackImpl<SyncProxyServiceHelper> callback_; 250 CompletionCallbackImpl<SyncProxyServiceHelper> callback_;
251 ProxyInfo proxy_info_; 251 ProxyInfo proxy_info_;
252 int result_; 252 int result_;
253 }; 253 };
254 254
255 } // namespace net 255 } // namespace net
256 256
257 #endif // NET_PROXY_PROXY_SERVICE_H_ 257 #endif // NET_PROXY_PROXY_SERVICE_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_fetcher_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698