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

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

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang errors. Created 7 years, 8 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_signature.cc ('k') | chromeos/network/onc/onc_utils.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_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 "chromeos/network/onc/onc_constants.h" 10 #include "chromeos/network/onc/onc_constants.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 { network_type::kVPN, flimflam::kTypeVPN }, 183 { network_type::kVPN, flimflam::kTypeVPN },
184 { NULL } 184 { NULL }
185 }; 185 };
186 186
187 const StringTranslationEntry kVPNTypeTable[] = { 187 const StringTranslationEntry kVPNTypeTable[] = {
188 { vpn::kTypeL2TP_IPsec, flimflam::kProviderL2tpIpsec }, 188 { vpn::kTypeL2TP_IPsec, flimflam::kProviderL2tpIpsec },
189 { vpn::kOpenVPN, flimflam::kProviderOpenVpn }, 189 { vpn::kOpenVPN, flimflam::kProviderOpenVpn },
190 { NULL } 190 { NULL }
191 }; 191 };
192 192
193 // The first matching line is chosen.
193 const StringTranslationEntry kWiFiSecurityTable[] = { 194 const StringTranslationEntry kWiFiSecurityTable[] = {
194 { wifi::kNone, flimflam::kSecurityNone }, 195 { wifi::kNone, flimflam::kSecurityNone },
195 { wifi::kWEP_PSK, flimflam::kSecurityWep }, 196 { wifi::kWEP_PSK, flimflam::kSecurityWep },
196 { wifi::kWPA_PSK, flimflam::kSecurityPsk }, 197 { wifi::kWPA_PSK, flimflam::kSecurityPsk },
197 { wifi::kWPA_EAP, flimflam::kSecurity8021x }, 198 { wifi::kWPA_EAP, flimflam::kSecurity8021x },
199 { wifi::kWPA_PSK, flimflam::kSecurityRsn },
198 { NULL } 200 { NULL }
199 }; 201 };
200 202
201 const StringTranslationEntry kEAPOuterTable[] = { 203 const StringTranslationEntry kEAPOuterTable[] = {
202 { eap::kPEAP, flimflam::kEapMethodPEAP }, 204 { eap::kPEAP, flimflam::kEapMethodPEAP },
203 { eap::kEAP_TLS, flimflam::kEapMethodTLS }, 205 { eap::kEAP_TLS, flimflam::kEapMethodTLS },
204 { eap::kEAP_TTLS, flimflam::kEapMethodTTLS }, 206 { eap::kEAP_TTLS, flimflam::kEapMethodTTLS },
205 { eap::kLEAP, flimflam::kEapMethodLEAP }, 207 { eap::kLEAP, flimflam::kEapMethodLEAP },
206 { NULL } 208 { NULL }
207 }; 209 };
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 continue; 268 continue;
267 *onc_value = table[i].onc_value; 269 *onc_value = table[i].onc_value;
268 return true; 270 return true;
269 } 271 }
270 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; 272 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC";
271 return false; 273 return false;
272 } 274 }
273 275
274 } // namespace onc 276 } // namespace onc
275 } // namespace chromeos 277 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698