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

Side by Side Diff: chrome/browser/chromeos/proxy_config_service_impl.cc

Issue 10578017: Test GURL::spec() usage changes with DEPS rolled to the new version. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years, 6 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
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 "chrome/browser/chromeos/proxy_config_service_impl.h" 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 if (!proxy_proto.ParseFromString(input)) 288 if (!proxy_proto.ParseFromString(input))
289 return false; 289 return false;
290 290
291 const std::string& mode_string(proxy_proto.proxy_mode()); 291 const std::string& mode_string(proxy_proto.proxy_mode());
292 if (mode_string == ProxyPrefs::kDirectProxyModeName) { 292 if (mode_string == ProxyPrefs::kDirectProxyModeName) {
293 mode = MODE_DIRECT; 293 mode = MODE_DIRECT;
294 } else if (mode_string == ProxyPrefs::kAutoDetectProxyModeName) { 294 } else if (mode_string == ProxyPrefs::kAutoDetectProxyModeName) {
295 mode = MODE_AUTO_DETECT; 295 mode = MODE_AUTO_DETECT;
296 } else if (mode_string == ProxyPrefs::kPacScriptProxyModeName) { 296 } else if (mode_string == ProxyPrefs::kPacScriptProxyModeName) {
297 mode = MODE_PAC_SCRIPT; 297 mode = MODE_PAC_SCRIPT;
298 if (proxy_proto.has_proxy_pac_url()) 298 if (proxy_proto.has_proxy_pac_url()) {
299 automatic_proxy.pac_url = GURL(proxy_proto.proxy_pac_url()); 299 GURL pac_url = GURL(proxy_proto.proxy_pac_url());
300 automatic_proxy.pac_url = pac_url.is_valid() ? pac_url : GURL();
301 }
300 } else if (mode_string == ProxyPrefs::kFixedServersProxyModeName) { 302 } else if (mode_string == ProxyPrefs::kFixedServersProxyModeName) {
301 net::ProxyConfig::ProxyRules rules; 303 net::ProxyConfig::ProxyRules rules;
302 rules.ParseFromString(proxy_proto.proxy_server()); 304 rules.ParseFromString(proxy_proto.proxy_server());
303 switch (rules.type) { 305 switch (rules.type) {
304 case net::ProxyConfig::ProxyRules::TYPE_NO_RULES: 306 case net::ProxyConfig::ProxyRules::TYPE_NO_RULES:
305 return false; 307 return false;
306 case net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY: 308 case net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY:
307 if (!rules.single_proxy.is_valid()) 309 if (!rules.single_proxy.is_valid())
308 return false; 310 return false;
309 mode = MODE_SINGLE_PROXY; 311 mode = MODE_SINGLE_PROXY;
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 device_config_.clear(); 842 device_config_.clear();
841 return; 843 return;
842 } 844 }
843 if (!active_network_.empty()) { 845 if (!active_network_.empty()) {
844 VLOG(1) << this << ": try migrating device config to " << active_network_; 846 VLOG(1) << this << ": try migrating device config to " << active_network_;
845 SetProxyConfigForNetwork(active_network_, device_config_, true); 847 SetProxyConfigForNetwork(active_network_, device_config_, true);
846 } 848 }
847 } 849 }
848 850
849 } // namespace chromeos 851 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_private_api.cc ('k') | chrome/browser/extensions/apps_promo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698