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

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

Issue 12315019: Change ProxyRules to handle ProxyLists rather than just single ProxyServer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_config_service_ios.h" 5 #include "net/proxy/proxy_config_service_ios.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #include <CFNetwork/CFProxySupport.h> 8 #include <CFNetwork/CFProxySupport.h>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 kCFNetworkProxiesHTTPEnable, 71 kCFNetworkProxiesHTTPEnable,
72 false)) { 72 false)) {
73 ProxyServer proxy_server = 73 ProxyServer proxy_server =
74 ProxyServer::FromDictionary(ProxyServer::SCHEME_HTTP, 74 ProxyServer::FromDictionary(ProxyServer::SCHEME_HTTP,
75 config_dict.get(), 75 config_dict.get(),
76 kCFNetworkProxiesHTTPProxy, 76 kCFNetworkProxiesHTTPProxy,
77 kCFNetworkProxiesHTTPPort); 77 kCFNetworkProxiesHTTPPort);
78 if (proxy_server.is_valid()) { 78 if (proxy_server.is_valid()) {
79 config->proxy_rules().type = 79 config->proxy_rules().type =
80 ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME; 80 ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME;
81 config->proxy_rules().proxy_for_http = proxy_server; 81 config->proxy_rules().proxies_for_http.SetSingleProxyServer(proxy_server);
82 // Desktop Safari applies the HTTP proxy to http:// URLs only, but 82 // Desktop Safari applies the HTTP proxy to http:// URLs only, but
83 // Mobile Safari applies the HTTP proxy to https:// URLs as well. 83 // Mobile Safari applies the HTTP proxy to https:// URLs as well.
84 config->proxy_rules().proxy_for_https = proxy_server; 84 config->proxy_rules().proxies_for_https.SetSingleProxyServer(
85 proxy_server);
85 } 86 }
86 } 87 }
87 88
88 // Proxy bypass list is not supported. 89 // Proxy bypass list is not supported.
89 // The kCFNetworkProxiesExceptionsList key is not available on iOS. 90 // The kCFNetworkProxiesExceptionsList key is not available on iOS.
90 91
91 // Proxy bypass boolean is not supported. 92 // Proxy bypass boolean is not supported.
92 // The kCFNetworkProxiesExcludeSimpleHostnames key is not available on iOS. 93 // The kCFNetworkProxiesExcludeSimpleHostnames key is not available on iOS.
93 94
94 // Source 95 // Source
95 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM); 96 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM);
96 } 97 }
97 98
98 } // namespace 99 } // namespace
99 100
100 ProxyConfigServiceIOS::ProxyConfigServiceIOS() 101 ProxyConfigServiceIOS::ProxyConfigServiceIOS()
101 : PollingProxyConfigService(base::TimeDelta::FromSeconds(kPollIntervalSec), 102 : PollingProxyConfigService(base::TimeDelta::FromSeconds(kPollIntervalSec),
102 GetCurrentProxyConfig) { 103 GetCurrentProxyConfig) {
103 } 104 }
104 105
105 ProxyConfigServiceIOS::~ProxyConfigServiceIOS() { 106 ProxyConfigServiceIOS::~ProxyConfigServiceIOS() {
106 } 107 }
107 108
108 } // namespace net 109 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698