OLD | NEW |
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 "chrome/browser/chromeos/proxy_cros_settings_parser.h" | 5 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 config.SetProxyForScheme( | 254 config.SetProxyForScheme( |
255 "socks", CreateProxyServerFromPort( | 255 "socks", CreateProxyServerFromPort( |
256 val, config.socks_proxy, | 256 val, config.socks_proxy, |
257 base::StartsWith(host, "socks5://", | 257 base::StartsWith(host, "socks5://", |
258 base::CompareCase::INSENSITIVE_ASCII) | 258 base::CompareCase::INSENSITIVE_ASCII) |
259 ? net::ProxyServer::SCHEME_SOCKS5 | 259 ? net::ProxyServer::SCHEME_SOCKS5 |
260 : net::ProxyServer::SCHEME_SOCKS4)); | 260 : net::ProxyServer::SCHEME_SOCKS4)); |
261 } | 261 } |
262 } else if (path == kProxyIgnoreList) { | 262 } else if (path == kProxyIgnoreList) { |
263 net::ProxyBypassRules bypass_rules; | 263 net::ProxyBypassRules bypass_rules; |
264 if (in_value->GetType() == base::Value::TYPE_LIST) { | 264 if (in_value->GetType() == base::Value::Type::LIST) { |
265 const base::ListValue* list_value = | 265 const base::ListValue* list_value = |
266 static_cast<const base::ListValue*>(in_value); | 266 static_cast<const base::ListValue*>(in_value); |
267 for (size_t x = 0; x < list_value->GetSize(); x++) { | 267 for (size_t x = 0; x < list_value->GetSize(); x++) { |
268 std::string val; | 268 std::string val; |
269 if (list_value->GetString(x, &val)) | 269 if (list_value->GetString(x, &val)) |
270 bypass_rules.AddRuleFromString(val); | 270 bypass_rules.AddRuleFromString(val); |
271 } | 271 } |
272 config.SetBypassRules(bypass_rules); | 272 config.SetBypassRules(bypass_rules); |
273 } | 273 } |
274 } else { | 274 } else { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 } else { | 368 } else { |
369 dict->SetBoolean("disabled", false); | 369 dict->SetBoolean("disabled", false); |
370 } | 370 } |
371 *out_value = dict; | 371 *out_value = dict; |
372 return true; | 372 return true; |
373 } | 373 } |
374 | 374 |
375 } // namespace proxy_cros_settings_parser | 375 } // namespace proxy_cros_settings_parser |
376 | 376 |
377 } // namespace chromeos | 377 } // namespace chromeos |
OLD | NEW |