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

Side by Side Diff: chromeos/network/network_util.cc

Issue 694533007: Add 'setProperties' to InternetOptionsHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + feedback Created 6 years, 1 month 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_util.h ('k') | chromeos/network/onc/onc_translator_onc_to_shill.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/network_util.h" 5 #include "chromeos/network/network_util.h"
6 6
7 #include "base/strings/string_tokenizer.h" 7 #include "base/strings/string_tokenizer.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chromeos/network/network_state.h" 10 #include "chromeos/network/network_state.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 std::string TranslateONCTypeToShill(const std::string& onc_type) { 186 std::string TranslateONCTypeToShill(const std::string& onc_type) {
187 if (onc_type == ::onc::network_type::kEthernet) 187 if (onc_type == ::onc::network_type::kEthernet)
188 return shill::kTypeEthernet; 188 return shill::kTypeEthernet;
189 std::string shill_type; 189 std::string shill_type;
190 onc::TranslateStringToShill(onc::kNetworkTypeTable, onc_type, &shill_type); 190 onc::TranslateStringToShill(onc::kNetworkTypeTable, onc_type, &shill_type);
191 return shill_type; 191 return shill_type;
192 } 192 }
193 193
194 std::string TranslateShillTypeToONC(const std::string& shill_type) {
195 if (shill_type == shill::kTypeEthernet)
196 return ::onc::network_type::kEthernet;
197 std::string onc_type;
198 onc::TranslateStringToONC(onc::kNetworkTypeTable, shill_type, &onc_type);
199 return onc_type;
200 }
201
194 } // namespace network_util 202 } // namespace network_util
195 } // namespace chromeos 203 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_util.h ('k') | chromeos/network/onc/onc_translator_onc_to_shill.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698