| 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_config_service_impl.h" | 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 new_config.reset(ProxyConfigDictionary::CreateFixedServers( | 326 new_config.reset(ProxyConfigDictionary::CreateFixedServers( |
| 327 input.server, input.bypass_rules)); | 327 input.server, input.bypass_rules)); |
| 328 break; | 328 break; |
| 329 } | 329 } |
| 330 result->Swap(new_config.get()); | 330 result->Swap(new_config.get()); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void SetUserConfigInShill(base::DictionaryValue* pref_proxy_config_dict) { | 333 void SetUserConfigInShill(base::DictionaryValue* pref_proxy_config_dict) { |
| 334 std::string proxy_config; | 334 std::string proxy_config; |
| 335 if (pref_proxy_config_dict) | 335 if (pref_proxy_config_dict) |
| 336 base::JSONWriter::Write(pref_proxy_config_dict, &proxy_config); | 336 base::JSONWriter::Write(*pref_proxy_config_dict, &proxy_config); |
| 337 | 337 |
| 338 NetworkStateHandler* network_state_handler = | 338 NetworkStateHandler* network_state_handler = |
| 339 NetworkHandler::Get()->network_state_handler(); | 339 NetworkHandler::Get()->network_state_handler(); |
| 340 const NetworkState* network = network_state_handler->DefaultNetwork(); | 340 const NetworkState* network = network_state_handler->DefaultNetwork(); |
| 341 ASSERT_TRUE(network); | 341 ASSERT_TRUE(network); |
| 342 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface()-> | 342 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface()-> |
| 343 SetServiceProperty(network->path(), | 343 SetServiceProperty(network->path(), |
| 344 shill::kProxyConfigProperty, | 344 shill::kProxyConfigProperty, |
| 345 base::StringValue(proxy_config)); | 345 base::StringValue(proxy_config)); |
| 346 } | 346 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 network_configs.release()); | 514 network_configs.release()); |
| 515 | 515 |
| 516 net::ProxyConfig actual_config; | 516 net::ProxyConfig actual_config; |
| 517 SyncGetLatestProxyConfig(&actual_config); | 517 SyncGetLatestProxyConfig(&actual_config); |
| 518 net::ProxyConfig expected_config = | 518 net::ProxyConfig expected_config = |
| 519 net::ProxyConfig::CreateFromCustomPacURL(GURL("http://domain.com/x")); | 519 net::ProxyConfig::CreateFromCustomPacURL(GURL("http://domain.com/x")); |
| 520 EXPECT_TRUE(expected_config.Equals(actual_config)); | 520 EXPECT_TRUE(expected_config.Equals(actual_config)); |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // namespace chromeos | 523 } // namespace chromeos |
| OLD | NEW |