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

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

Issue 13473003: Rename ONC field Trust to TrustBits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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_constants.cc ('k') | chromeos/network/onc/onc_signature.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"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void Normalizer::NormalizeCertificate(base::DictionaryValue* cert) { 81 void Normalizer::NormalizeCertificate(base::DictionaryValue* cert) {
82 using namespace certificate; 82 using namespace certificate;
83 83
84 bool remove = false; 84 bool remove = false;
85 cert->GetBooleanWithoutPathExpansion(kRemove, &remove); 85 cert->GetBooleanWithoutPathExpansion(kRemove, &remove);
86 RemoveEntryUnless(cert, certificate::kType, !remove); 86 RemoveEntryUnless(cert, certificate::kType, !remove);
87 87
88 std::string type; 88 std::string type;
89 cert->GetStringWithoutPathExpansion(certificate::kType, &type); 89 cert->GetStringWithoutPathExpansion(certificate::kType, &type);
90 RemoveEntryUnless(cert, kPKCS12, type == kClient); 90 RemoveEntryUnless(cert, kPKCS12, type == kClient);
91 RemoveEntryUnless(cert, kTrust, type == kServer || type == kAuthority); 91 RemoveEntryUnless(cert, kTrustBits, type == kServer || type == kAuthority);
92 RemoveEntryUnless(cert, kX509, type == kServer || type == kAuthority); 92 RemoveEntryUnless(cert, kX509, type == kServer || type == kAuthority);
93 } 93 }
94 94
95 void Normalizer::NormalizeEthernet(base::DictionaryValue* ethernet) { 95 void Normalizer::NormalizeEthernet(base::DictionaryValue* ethernet) {
96 using namespace ethernet; 96 using namespace ethernet;
97 97
98 std::string auth; 98 std::string auth;
99 ethernet->GetStringWithoutPathExpansion(kAuthentication, &auth); 99 ethernet->GetStringWithoutPathExpansion(kAuthentication, &auth);
100 RemoveEntryUnless(ethernet, kEAP, auth == k8021X); 100 RemoveEntryUnless(ethernet, kEAP, auth == k8021X);
101 } 101 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 std::string security; 200 std::string security;
201 wifi->GetStringWithoutPathExpansion(wifi::kSecurity, &security); 201 wifi->GetStringWithoutPathExpansion(wifi::kSecurity, &security);
202 RemoveEntryUnless(wifi, kEAP, security == kWEP_8021X || security == kWPA_EAP); 202 RemoveEntryUnless(wifi, kEAP, security == kWEP_8021X || security == kWPA_EAP);
203 RemoveEntryUnless(wifi, kPassphrase, 203 RemoveEntryUnless(wifi, kPassphrase,
204 security == kWEP_PSK || security == kWPA_PSK); 204 security == kWEP_PSK || security == kWPA_PSK);
205 } 205 }
206 206
207 } // namespace onc 207 } // namespace onc
208 } // namespace chromeos 208 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_constants.cc ('k') | chromeos/network/onc/onc_signature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698