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

Side by Side Diff: chromeos/network/onc/onc_translator_shill_to_onc.cc

Issue 108603005: Update uses of Value in chromeos/, cloud_print/, components/, content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/network/onc/onc_translator.h" 5 #include "chromeos/network/onc/onc_translator.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 if (nested_object->empty()) 309 if (nested_object->empty())
310 return; 310 return;
311 onc_object_->SetWithoutPathExpansion(onc_field_name, nested_object.release()); 311 onc_object_->SetWithoutPathExpansion(onc_field_name, nested_object.release());
312 } 312 }
313 313
314 void ShillToONCTranslator::TranslateAndAddListOfObjects( 314 void ShillToONCTranslator::TranslateAndAddListOfObjects(
315 const std::string& onc_field_name, 315 const std::string& onc_field_name,
316 const base::ListValue& list) { 316 const base::ListValue& list) {
317 const OncFieldSignature* field_signature = 317 const OncFieldSignature* field_signature =
318 GetFieldSignature(*onc_signature_, onc_field_name); 318 GetFieldSignature(*onc_signature_, onc_field_name);
319 if (field_signature->value_signature->onc_type != Value::TYPE_LIST) { 319 if (field_signature->value_signature->onc_type != base::Value::TYPE_LIST) {
320 LOG(ERROR) << "ONC Field name: '" << onc_field_name << "' has type '" 320 LOG(ERROR) << "ONC Field name: '" << onc_field_name << "' has type '"
321 << field_signature->value_signature->onc_type 321 << field_signature->value_signature->onc_type
322 << "', expected: base::Value::TYPE_LIST."; 322 << "', expected: base::Value::TYPE_LIST.";
323 return; 323 return;
324 } 324 }
325 DCHECK(field_signature->value_signature->onc_array_entry_signature); 325 DCHECK(field_signature->value_signature->onc_array_entry_signature);
326 scoped_ptr<base::ListValue> result(new base::ListValue()); 326 scoped_ptr<base::ListValue> result(new base::ListValue());
327 for (base::ListValue::const_iterator it = list.begin(); 327 for (base::ListValue::const_iterator it = list.begin();
328 it != list.end(); ++it) { 328 it != list.end(); ++it) {
329 const base::DictionaryValue* shill_value = NULL; 329 const base::DictionaryValue* shill_value = NULL;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 const base::DictionaryValue& shill_dictionary, 411 const base::DictionaryValue& shill_dictionary,
412 const OncValueSignature* onc_signature) { 412 const OncValueSignature* onc_signature) {
413 CHECK(onc_signature != NULL); 413 CHECK(onc_signature != NULL);
414 414
415 ShillToONCTranslator translator(shill_dictionary, *onc_signature); 415 ShillToONCTranslator translator(shill_dictionary, *onc_signature);
416 return translator.CreateTranslatedONCObject(); 416 return translator.CreateTranslatedONCObject();
417 } 417 }
418 418
419 } // namespace onc 419 } // namespace onc
420 } // namespace chromeos 420 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698