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

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

Issue 5961005: Create a URLRequestContext for PAC fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 10 years 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 | « chrome/browser/net/connection_tester_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 ProxyConfigService* proxy_config_service, 186 ProxyConfigService* proxy_config_service,
187 NetLog* net_log); 187 NetLog* net_log);
188 188
189 // Convenience methods that creates a proxy service using the 189 // Convenience methods that creates a proxy service using the
190 // specified fixed settings. 190 // specified fixed settings.
191 static ProxyService* CreateFixed(const ProxyConfig& pc); 191 static ProxyService* CreateFixed(const ProxyConfig& pc);
192 static ProxyService* CreateFixed(const std::string& proxy); 192 static ProxyService* CreateFixed(const std::string& proxy);
193 193
194 // Creates a proxy service that uses a DIRECT connection for all requests. 194 // Creates a proxy service that uses a DIRECT connection for all requests.
195 static ProxyService* CreateDirect(); 195 static ProxyService* CreateDirect();
196 // |net_log|'s lifetime must exceed ProxyService.
197 static ProxyService* CreateDirectWithNetLog(NetLog* net_log);
196 198
197 // This method is used by tests to create a ProxyService that returns a 199 // This method is used by tests to create a ProxyService that returns a
198 // hardcoded proxy fallback list (|pac_string|) for every URL. 200 // hardcoded proxy fallback list (|pac_string|) for every URL.
199 // 201 //
200 // |pac_string| is a list of proxy servers, in the format that a PAC script 202 // |pac_string| is a list of proxy servers, in the format that a PAC script
201 // would return it. For example, "PROXY foobar:99; SOCKS fml:2; DIRECT" 203 // would return it. For example, "PROXY foobar:99; SOCKS fml:2; DIRECT"
202 static ProxyService* CreateFixedFromPacResult(const std::string& pac_string); 204 static ProxyService* CreateFixedFromPacResult(const std::string& pac_string);
203 205
204 // Creates a config service appropriate for this platform that fetches the 206 // Creates a config service appropriate for this platform that fetches the
205 // system proxy settings. 207 // system proxy settings.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 369
368 base::WaitableEvent event_; 370 base::WaitableEvent event_;
369 CompletionCallbackImpl<SyncProxyServiceHelper> callback_; 371 CompletionCallbackImpl<SyncProxyServiceHelper> callback_;
370 ProxyInfo proxy_info_; 372 ProxyInfo proxy_info_;
371 int result_; 373 int result_;
372 }; 374 };
373 375
374 } // namespace net 376 } // namespace net
375 377
376 #endif // NET_PROXY_PROXY_SERVICE_H_ 378 #endif // NET_PROXY_PROXY_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/connection_tester_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698