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

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

Issue 11414101: This adds ManagedNetworkConfigurationHandler first pass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload after merge Created 7 years, 10 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/network_state.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 } 87 }
88 88
89 scoped_ptr<base::Value> Mapper::MapField( 89 scoped_ptr<base::Value> Mapper::MapField(
90 const std::string& field_name, 90 const std::string& field_name,
91 const OncValueSignature& object_signature, 91 const OncValueSignature& object_signature,
92 const base::Value& onc_value, 92 const base::Value& onc_value,
93 bool* found_unknown_field, 93 bool* found_unknown_field,
94 bool* error) { 94 bool* error) {
95 const OncFieldSignature* field_signature = 95 const OncFieldSignature* field_signature =
96 GetFieldSignature(object_signature, field_name); 96 GetOncFieldSignature(object_signature, field_name);
97 97
98 if (field_signature != NULL) { 98 if (field_signature != NULL) {
99 DCHECK(field_signature->value_signature != NULL) 99 DCHECK(field_signature->value_signature != NULL)
100 << "Found missing value signature at field '" << field_name << "'."; 100 << "Found missing value signature at field '" << field_name << "'.";
101 101
102 return MapValue(*field_signature->value_signature, onc_value, error); 102 return MapValue(*field_signature->value_signature, onc_value, error);
103 } else { 103 } else {
104 DVLOG(1) << "Found unknown field name: '" << field_name << "'"; 104 DVLOG(1) << "Found unknown field name: '" << field_name << "'";
105 *found_unknown_field = true; 105 *found_unknown_field = true;
106 return scoped_ptr<base::Value>(); 106 return scoped_ptr<base::Value>();
(...skipping 28 matching lines...) Expand all
135 135
136 scoped_ptr<base::Value> Mapper::MapEntry(int index, 136 scoped_ptr<base::Value> Mapper::MapEntry(int index,
137 const OncValueSignature& signature, 137 const OncValueSignature& signature,
138 const base::Value& onc_value, 138 const base::Value& onc_value,
139 bool* error) { 139 bool* error) {
140 return MapValue(signature, onc_value, error); 140 return MapValue(signature, onc_value, error);
141 } 141 }
142 142
143 } // namespace onc 143 } // namespace onc
144 } // namespace chromeos 144 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state.cc ('k') | chromeos/network/onc/onc_signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698