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

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

Issue 12390017: Separating ONC<->Shill translation from the ONC signature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed browser tests. Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_constants.cc ('k') | chromeos/network/onc/onc_signature.h » ('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_mapper.h" 5 #include "chromeos/network/onc/onc_mapper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/network/onc/onc_signature.h" 9 #include "chromeos/network/onc/onc_signature.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const base::Value& onc_primitive, 60 const base::Value& onc_primitive,
61 bool* error) { 61 bool* error) {
62 return make_scoped_ptr(onc_primitive.DeepCopy()); 62 return make_scoped_ptr(onc_primitive.DeepCopy());
63 } 63 }
64 64
65 void Mapper::MapFields(const OncValueSignature& object_signature, 65 void Mapper::MapFields(const OncValueSignature& object_signature,
66 const base::DictionaryValue& onc_object, 66 const base::DictionaryValue& onc_object,
67 bool* found_unknown_field, 67 bool* found_unknown_field,
68 bool* nested_error, 68 bool* nested_error,
69 base::DictionaryValue* result) { 69 base::DictionaryValue* result) {
70
71 for (base::DictionaryValue::Iterator it(onc_object); it.HasNext(); 70 for (base::DictionaryValue::Iterator it(onc_object); it.HasNext();
72 it.Advance()) { 71 it.Advance()) {
73 bool current_field_unknown = false; 72 bool current_field_unknown = false;
74 scoped_ptr<base::Value> result_value = MapField(it.key(), 73 scoped_ptr<base::Value> result_value = MapField(it.key(),
75 object_signature, 74 object_signature,
76 it.value(), 75 it.value(),
77 &current_field_unknown, 76 &current_field_unknown,
78 nested_error); 77 nested_error);
79 78
80 if (current_field_unknown) 79 if (current_field_unknown)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 134
136 scoped_ptr<base::Value> Mapper::MapEntry(int index, 135 scoped_ptr<base::Value> Mapper::MapEntry(int index,
137 const OncValueSignature& signature, 136 const OncValueSignature& signature,
138 const base::Value& onc_value, 137 const base::Value& onc_value,
139 bool* error) { 138 bool* error) {
140 return MapValue(signature, onc_value, error); 139 return MapValue(signature, onc_value, error);
141 } 140 }
142 141
143 } // namespace onc 142 } // namespace onc
144 } // namespace chromeos 143 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_constants.cc ('k') | chromeos/network/onc/onc_signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698