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

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

Issue 149191: Whenever proxy configurations contain socks and http/https/ftp proxies, socks... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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_server_unittest.cc ('k') | net/proxy/proxy_service_unittest.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 #include "net/proxy/proxy_service.h" 5 #include "net/proxy/proxy_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 if (ShouldBypassProxyForURL(url)) { 326 if (ShouldBypassProxyForURL(url)) {
327 result->UseDirect(); 327 result->UseDirect();
328 return; 328 return;
329 } 329 }
330 330
331 switch (proxy_rules.type) { 331 switch (proxy_rules.type) {
332 case ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY: 332 case ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY:
333 result->UseProxyServer(proxy_rules.single_proxy); 333 result->UseProxyServer(proxy_rules.single_proxy);
334 break; 334 break;
335 case ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME: { 335 case ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME: {
336 const ProxyServer* entry = proxy_rules.MapSchemeToProxy(url.scheme()); 336 const ProxyServer* entry = proxy_rules.MapUrlSchemeToProxy(url.scheme());
337 if (entry) { 337 if (entry) {
338 result->UseProxyServer(*entry); 338 result->UseProxyServer(*entry);
339 } else { 339 } else {
340 // We failed to find a matching proxy server for the current URL 340 // We failed to find a matching proxy server for the current URL
341 // scheme. Default to direct. 341 // scheme. Default to direct.
342 result->UseDirect(); 342 result->UseDirect();
343 } 343 }
344 break; 344 break;
345 } 345 }
346 default: 346 default:
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 OnCompletion(result_); 761 OnCompletion(result_);
762 } 762 }
763 } 763 }
764 764
765 void SyncProxyServiceHelper::OnCompletion(int rv) { 765 void SyncProxyServiceHelper::OnCompletion(int rv) {
766 result_ = rv; 766 result_ = rv;
767 event_.Signal(); 767 event_.Signal();
768 } 768 }
769 769
770 } // namespace net 770 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_server_unittest.cc ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698