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

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

Issue 482243002: Use Managed properties for Preferred and Provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback, fix unittests Created 6 years, 4 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
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_translation_tables.h" 5 #include "chromeos/network/onc/onc_translation_tables.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "components/onc/onc_constants.h" 10 #include "components/onc/onc_constants.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 { ::onc::cellular::kActivationType, shill::kActivationTypeProperty}, 152 { ::onc::cellular::kActivationType, shill::kActivationTypeProperty},
153 { ::onc::cellular::kActivationState, shill::kActivationStateProperty}, 153 { ::onc::cellular::kActivationState, shill::kActivationStateProperty},
154 { ::onc::cellular::kNetworkTechnology, shill::kNetworkTechnologyProperty}, 154 { ::onc::cellular::kNetworkTechnology, shill::kNetworkTechnologyProperty},
155 { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty}, 155 { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty},
156 {NULL}}; 156 {NULL}};
157 157
158 const FieldTranslationEntry network_fields[] = { 158 const FieldTranslationEntry network_fields[] = {
159 { ::onc::network_config::kGUID, shill::kGuidProperty}, 159 { ::onc::network_config::kGUID, shill::kGuidProperty},
160 { ::onc::network_config::kConnectable, shill::kConnectableProperty }, 160 { ::onc::network_config::kConnectable, shill::kConnectableProperty },
161 { ::onc::network_config::kErrorState, shill::kErrorProperty }, 161 { ::onc::network_config::kErrorState, shill::kErrorProperty },
162 { ::onc::network_config::kPriority, shill::kPriorityProperty },
162 163
163 // Shill doesn't allow setting the name for non-VPN networks. 164 // Shill doesn't allow setting the name for non-VPN networks.
164 // Name is conditionally translated, see onc_translator_*. 165 // Name is conditionally translated, see onc_translator_*.
165 // { ::onc::network_config::kName, shill::kNameProperty }, 166 // { ::onc::network_config::kName, shill::kNameProperty },
166 167
167 // Type is converted during translation, see onc_translator_*. 168 // Type is converted during translation, see onc_translator_*.
168 // { ::onc::network_config::kType, shill::kTypeProperty }, 169 // { ::onc::network_config::kType, shill::kTypeProperty },
169 170
170 // These fields are converted during translation, see 171 // These fields are converted during translation, see
171 // onc_translator_shill_to_onc.cc. They are only converted when going from 172 // onc_translator_shill_to_onc.cc. They are only converted when going from
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 continue; 366 continue;
366 *onc_value = table[i].onc_value; 367 *onc_value = table[i].onc_value;
367 return true; 368 return true;
368 } 369 }
369 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; 370 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC";
370 return false; 371 return false;
371 } 372 }
372 373
373 } // namespace onc 374 } // namespace onc
374 } // namespace chromeos 375 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698