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

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

Issue 759663004: ONC: add support for non-utf-8 SSIDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed issues Created 6 years 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/onc/onc_normalizer.h ('k') | chromeos/network/onc/onc_normalizer_unittest.cc » ('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"
11 #include "chromeos/network/onc/onc_signature.h" 11 #include "chromeos/network/onc/onc_signature.h"
12 #include "chromeos/network/onc/onc_utils.h"
12 #include "components/onc/onc_constants.h" 13 #include "components/onc/onc_constants.h"
13 14
14 namespace chromeos { 15 namespace chromeos {
15 namespace onc { 16 namespace onc {
16 17
17 Normalizer::Normalizer(bool remove_recommended_fields) 18 Normalizer::Normalizer(bool remove_recommended_fields)
18 : remove_recommended_fields_(remove_recommended_fields) { 19 : remove_recommended_fields_(remove_recommended_fields) {
19 } 20 }
20 21
21 Normalizer::~Normalizer() { 22 Normalizer::~Normalizer() {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 226 }
226 227
227 void Normalizer::NormalizeWiFi(base::DictionaryValue* wifi) { 228 void Normalizer::NormalizeWiFi(base::DictionaryValue* wifi) {
228 using namespace ::onc::wifi; 229 using namespace ::onc::wifi;
229 230
230 std::string security; 231 std::string security;
231 wifi->GetStringWithoutPathExpansion(::onc::wifi::kSecurity, &security); 232 wifi->GetStringWithoutPathExpansion(::onc::wifi::kSecurity, &security);
232 RemoveEntryUnless(wifi, kEAP, security == kWEP_8021X || security == kWPA_EAP); 233 RemoveEntryUnless(wifi, kEAP, security == kWEP_8021X || security == kWPA_EAP);
233 RemoveEntryUnless(wifi, kPassphrase, 234 RemoveEntryUnless(wifi, kPassphrase,
234 security == kWEP_PSK || security == kWPA_PSK); 235 security == kWEP_PSK || security == kWPA_PSK);
236 FillInHexSSIDField(wifi);
235 } 237 }
236 238
237 } // namespace onc 239 } // namespace onc
238 } // namespace chromeos 240 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_normalizer.h ('k') | chromeos/network/onc/onc_normalizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698