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

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

Issue 11664005: Extending the translation from ONC to Shill. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 11 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 "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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 356 }
357 } 357 }
358 JSONStringValueSerializer serializer(output); 358 JSONStringValueSerializer serializer(output);
359 return serializer.Serialize(*dict); 359 return serializer.Serialize(*dict);
360 } 360 }
361 361
362 //----------- ProxyConfigServiceImpl::ProxyConfig: private methods ------------- 362 //----------- ProxyConfigServiceImpl::ProxyConfig: private methods -------------
363 363
364 // static 364 // static
365 void ProxyConfigServiceImpl::ProxyConfig::EncodeAndAppendProxyServer( 365 void ProxyConfigServiceImpl::ProxyConfig::EncodeAndAppendProxyServer(
366 const std::string& scheme, 366 const std::string& url_scheme,
367 const net::ProxyServer& server, 367 const net::ProxyServer& server,
368 std::string* spec) { 368 std::string* spec) {
369 if (!server.is_valid()) 369 if (!server.is_valid())
370 return; 370 return;
371 371
372 if (!spec->empty()) 372 if (!spec->empty())
373 *spec += ';'; 373 *spec += ';';
374 374
375 if (!scheme.empty()) { 375 if (!url_scheme.empty()) {
376 *spec += scheme; 376 *spec += url_scheme;
377 *spec += "="; 377 *spec += "=";
378 } 378 }
379 *spec += server.ToURI(); 379 *spec += server.ToURI();
380 } 380 }
381 381
382 //------------------- ProxyConfigServiceImpl: public methods ------------------- 382 //------------------- ProxyConfigServiceImpl: public methods -------------------
383 383
384 ProxyConfigServiceImpl::ProxyConfigServiceImpl(PrefService* pref_service) 384 ProxyConfigServiceImpl::ProxyConfigServiceImpl(PrefService* pref_service)
385 : PrefProxyConfigTrackerImpl(pref_service), 385 : PrefProxyConfigTrackerImpl(pref_service),
386 active_config_state_(ProxyPrefs::CONFIG_UNSET), 386 active_config_state_(ProxyPrefs::CONFIG_UNSET),
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 device_config_.clear(); 846 device_config_.clear();
847 return; 847 return;
848 } 848 }
849 if (!active_network_.empty()) { 849 if (!active_network_.empty()) {
850 VLOG(1) << "Try migrating device config to " << active_network_; 850 VLOG(1) << "Try migrating device config to " << active_network_;
851 SetProxyConfigForNetwork(active_network_, device_config_, true); 851 SetProxyConfigForNetwork(active_network_, device_config_, true);
852 } 852 }
853 } 853 }
854 854
855 } // namespace chromeos 855 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/proxy_config_service_impl.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698