| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |