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

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

Issue 368233004: ONC: Cleanup client certificate related fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation on Win/Mac. Created 6 years, 5 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_translation_tables.cc ('k') | chromeos/network/onc/onc_utils.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_translator.h" 5 #include "chromeos/network/onc/onc_translator.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } else { 138 } else {
139 CopyPropertiesAccordingToSignature(); 139 CopyPropertiesAccordingToSignature();
140 } 140 }
141 return onc_object_.Pass(); 141 return onc_object_.Pass();
142 } 142 }
143 143
144 void ShillToONCTranslator::TranslateEthernet() { 144 void ShillToONCTranslator::TranslateEthernet() {
145 std::string shill_network_type; 145 std::string shill_network_type;
146 shill_dictionary_->GetStringWithoutPathExpansion(shill::kTypeProperty, 146 shill_dictionary_->GetStringWithoutPathExpansion(shill::kTypeProperty,
147 &shill_network_type); 147 &shill_network_type);
148 const char* onc_auth = ::onc::ethernet::kNone; 148 const char* onc_auth = ::onc::ethernet::kAuthenticationNone;
149 if (shill_network_type == shill::kTypeEthernetEap) 149 if (shill_network_type == shill::kTypeEthernetEap)
150 onc_auth = ::onc::ethernet::k8021X; 150 onc_auth = ::onc::ethernet::k8021X;
151 onc_object_->SetStringWithoutPathExpansion(::onc::ethernet::kAuthentication, 151 onc_object_->SetStringWithoutPathExpansion(::onc::ethernet::kAuthentication,
152 onc_auth); 152 onc_auth);
153 } 153 }
154 154
155 void ShillToONCTranslator::TranslateOpenVPN() { 155 void ShillToONCTranslator::TranslateOpenVPN() {
156 if (shill_dictionary_->HasKey(shill::kOpenVPNVerifyX509NameProperty)) 156 if (shill_dictionary_->HasKey(shill::kOpenVPNVerifyX509NameProperty))
157 TranslateAndAddNestedObject(::onc::openvpn::kVerifyX509); 157 TranslateAndAddNestedObject(::onc::openvpn::kVerifyX509);
158 158
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 const base::DictionaryValue& shill_dictionary, 493 const base::DictionaryValue& shill_dictionary,
494 const OncValueSignature* onc_signature) { 494 const OncValueSignature* onc_signature) {
495 CHECK(onc_signature != NULL); 495 CHECK(onc_signature != NULL);
496 496
497 ShillToONCTranslator translator(shill_dictionary, *onc_signature); 497 ShillToONCTranslator translator(shill_dictionary, *onc_signature);
498 return translator.CreateTranslatedONCObject(); 498 return translator.CreateTranslatedONCObject();
499 } 499 }
500 500
501 } // namespace onc 501 } // namespace onc
502 } // namespace chromeos 502 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translation_tables.cc ('k') | chromeos/network/onc/onc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698