| 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 <string> | 5 #include <string> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 } | 576 } |
| 577 | 577 |
| 578 std::string proxy_config_str; | 578 std::string proxy_config_str; |
| 579 if (shill_dictionary_->GetStringWithoutPathExpansion( | 579 if (shill_dictionary_->GetStringWithoutPathExpansion( |
| 580 shill::kProxyConfigProperty, &proxy_config_str) && | 580 shill::kProxyConfigProperty, &proxy_config_str) && |
| 581 !proxy_config_str.empty()) { | 581 !proxy_config_str.empty()) { |
| 582 std::unique_ptr<base::DictionaryValue> proxy_config_value( | 582 std::unique_ptr<base::DictionaryValue> proxy_config_value( |
| 583 ReadDictionaryFromJson(proxy_config_str)); | 583 ReadDictionaryFromJson(proxy_config_str)); |
| 584 if (proxy_config_value) { | 584 if (proxy_config_value) { |
| 585 std::unique_ptr<base::DictionaryValue> proxy_settings = | 585 std::unique_ptr<base::DictionaryValue> proxy_settings = |
| 586 ConvertProxyConfigToOncProxySettings(*proxy_config_value); | 586 ConvertProxyConfigToOncProxySettings(std::move(proxy_config_value)); |
| 587 if (proxy_settings) { | 587 if (proxy_settings) { |
| 588 onc_object_->SetWithoutPathExpansion( | 588 onc_object_->SetWithoutPathExpansion( |
| 589 ::onc::network_config::kProxySettings, proxy_settings.release()); | 589 ::onc::network_config::kProxySettings, proxy_settings.release()); |
| 590 } | 590 } |
| 591 } | 591 } |
| 592 } | 592 } |
| 593 } | 593 } |
| 594 | 594 |
| 595 void ShillToONCTranslator::TranslateIPConfig() { | 595 void ShillToONCTranslator::TranslateIPConfig() { |
| 596 CopyPropertiesAccordingToSignature(); | 596 CopyPropertiesAccordingToSignature(); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 const NetworkState* network_state) { | 778 const NetworkState* network_state) { |
| 779 CHECK(onc_signature != NULL); | 779 CHECK(onc_signature != NULL); |
| 780 | 780 |
| 781 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature, | 781 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature, |
| 782 network_state); | 782 network_state); |
| 783 return translator.CreateTranslatedONCObject(); | 783 return translator.CreateTranslatedONCObject(); |
| 784 } | 784 } |
| 785 | 785 |
| 786 } // namespace onc | 786 } // namespace onc |
| 787 } // namespace chromeos | 787 } // namespace chromeos |
| OLD | NEW |