| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chromeos/network/shill_property_util.h" | 5 #include "chromeos/network/shill_property_util.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/i18n/icu_encoding_detection.h" | 9 #include "base/i18n/icu_encoding_detection.h" |
| 10 #include "base/i18n/icu_string_conversions.h" | 10 #include "base/i18n/icu_string_conversions.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 if (!ui_data) | 214 if (!ui_data) |
| 215 LOG(ERROR) << "UIData is not a valid JSON dictionary."; | 215 LOG(ERROR) << "UIData is not a valid JSON dictionary."; |
| 216 return ui_data.Pass(); | 216 return ui_data.Pass(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void SetUIData(const NetworkUIData& ui_data, | 219 void SetUIData(const NetworkUIData& ui_data, |
| 220 base::DictionaryValue* shill_dictionary) { | 220 base::DictionaryValue* shill_dictionary) { |
| 221 base::DictionaryValue ui_data_dict; | 221 base::DictionaryValue ui_data_dict; |
| 222 ui_data.FillDictionary(&ui_data_dict); | 222 ui_data.FillDictionary(&ui_data_dict); |
| 223 std::string ui_data_blob; | 223 std::string ui_data_blob; |
| 224 base::JSONWriter::Write(&ui_data_dict, &ui_data_blob); | 224 base::JSONWriter::Write(ui_data_dict, &ui_data_blob); |
| 225 shill_dictionary->SetStringWithoutPathExpansion(shill::kUIDataProperty, | 225 shill_dictionary->SetStringWithoutPathExpansion(shill::kUIDataProperty, |
| 226 ui_data_blob); | 226 ui_data_blob); |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool CopyIdentifyingProperties(const base::DictionaryValue& service_properties, | 229 bool CopyIdentifyingProperties(const base::DictionaryValue& service_properties, |
| 230 const bool properties_read_from_shill, | 230 const bool properties_read_from_shill, |
| 231 base::DictionaryValue* dest) { | 231 base::DictionaryValue* dest) { |
| 232 bool success = true; | 232 bool success = true; |
| 233 | 233 |
| 234 // GUID is optional. | 234 // GUID is optional. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 LOG(WARNING) | 372 LOG(WARNING) |
| 373 << "Provider name and country not defined, using code instead: " | 373 << "Provider name and country not defined, using code instead: " |
| 374 << *home_provider_id; | 374 << *home_provider_id; |
| 375 } | 375 } |
| 376 return true; | 376 return true; |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace shill_property_util | 379 } // namespace shill_property_util |
| 380 | 380 |
| 381 } // namespace chromeos | 381 } // namespace chromeos |
| OLD | NEW |