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

Side by Side Diff: chromeos/network/shill_property_util.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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 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
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
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
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translator_onc_to_shill.cc ('k') | cloud_print/gcp20/prototype/cloud_print_requester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698