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

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

Issue 1019033002: Add an ONC property for the third-party VPN provider extension ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser tests. Created 5 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
« no previous file with comments | « chromeos/network/network_state_unittest.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_normalizer.h" 5 #include "chromeos/network/onc/onc_normalizer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 void Normalizer::NormalizeVPN(base::DictionaryValue* vpn) { 227 void Normalizer::NormalizeVPN(base::DictionaryValue* vpn) {
228 using namespace ::onc::vpn; 228 using namespace ::onc::vpn;
229 229
230 std::string type; 230 std::string type;
231 vpn->GetStringWithoutPathExpansion(::onc::vpn::kType, &type); 231 vpn->GetStringWithoutPathExpansion(::onc::vpn::kType, &type);
232 RemoveEntryUnless(vpn, kOpenVPN, type == kOpenVPN); 232 RemoveEntryUnless(vpn, kOpenVPN, type == kOpenVPN);
233 RemoveEntryUnless(vpn, kIPsec, type == kIPsec || type == kTypeL2TP_IPsec); 233 RemoveEntryUnless(vpn, kIPsec, type == kIPsec || type == kTypeL2TP_IPsec);
234 RemoveEntryUnless(vpn, kL2TP, type == kTypeL2TP_IPsec); 234 RemoveEntryUnless(vpn, kL2TP, type == kTypeL2TP_IPsec);
235 RemoveEntryUnless(vpn, kThirdPartyVpn, type == kThirdPartyVpn);
235 } 236 }
236 237
237 void Normalizer::NormalizeWiFi(base::DictionaryValue* wifi) { 238 void Normalizer::NormalizeWiFi(base::DictionaryValue* wifi) {
238 using namespace ::onc::wifi; 239 using namespace ::onc::wifi;
239 240
240 std::string security; 241 std::string security;
241 wifi->GetStringWithoutPathExpansion(::onc::wifi::kSecurity, &security); 242 wifi->GetStringWithoutPathExpansion(::onc::wifi::kSecurity, &security);
242 RemoveEntryUnless(wifi, kEAP, security == kWEP_8021X || security == kWPA_EAP); 243 RemoveEntryUnless(wifi, kEAP, security == kWEP_8021X || security == kWPA_EAP);
243 RemoveEntryUnless(wifi, kPassphrase, 244 RemoveEntryUnless(wifi, kPassphrase,
244 security == kWEP_PSK || security == kWPA_PSK); 245 security == kWEP_PSK || security == kWPA_PSK);
245 FillInHexSSIDField(wifi); 246 FillInHexSSIDField(wifi);
246 } 247 }
247 248
248 } // namespace onc 249 } // namespace onc
249 } // namespace chromeos 250 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_unittest.cc ('k') | chromeos/network/onc/onc_signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698