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

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

Issue 1085993002: Revert of Use networkingPrivate.startConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430115_internet_options_cellular
Patch Set: Created 5 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
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/login/login_state.h" 10 #include "chromeos/login/login_state.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // not expose any sensitive properties in the resulting dictionary, it is 172 // not expose any sensitive properties in the resulting dictionary, it is
173 // only used to show connection state and icons. 173 // only used to show connection state and icons.
174 std::string user_id_hash = chromeos::LoginState::Get()->primary_user_hash(); 174 std::string user_id_hash = chromeos::LoginState::Get()->primary_user_hash();
175 ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; 175 ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE;
176 NetworkHandler::Get() 176 NetworkHandler::Get()
177 ->managed_network_configuration_handler() 177 ->managed_network_configuration_handler()
178 ->FindPolicyByGUID(user_id_hash, network->guid(), &onc_source); 178 ->FindPolicyByGUID(user_id_hash, network->guid(), &onc_source);
179 179
180 scoped_ptr<base::DictionaryValue> onc_dictionary = 180 scoped_ptr<base::DictionaryValue> onc_dictionary =
181 TranslateShillServiceToONCPart(*shill_dictionary, onc_source, 181 TranslateShillServiceToONCPart(*shill_dictionary, onc_source,
182 &onc::kNetworkWithStateSignature, network); 182 &onc::kNetworkWithStateSignature);
183 return onc_dictionary.Pass(); 183 return onc_dictionary.Pass();
184 } 184 }
185 185
186 scoped_ptr<base::ListValue> TranslateNetworkListToONC( 186 scoped_ptr<base::ListValue> TranslateNetworkListToONC(
187 NetworkTypePattern pattern, 187 NetworkTypePattern pattern,
188 bool configured_only, 188 bool configured_only,
189 bool visible_only, 189 bool visible_only,
190 int limit, 190 int limit,
191 bool debugging_properties) { 191 bool debugging_properties) {
192 NetworkStateHandler::NetworkStateList network_states; 192 NetworkStateHandler::NetworkStateList network_states;
(...skipping 28 matching lines...) Expand all
221 std::string TranslateShillTypeToONC(const std::string& shill_type) { 221 std::string TranslateShillTypeToONC(const std::string& shill_type) {
222 if (shill_type == shill::kTypeEthernet) 222 if (shill_type == shill::kTypeEthernet)
223 return ::onc::network_type::kEthernet; 223 return ::onc::network_type::kEthernet;
224 std::string onc_type; 224 std::string onc_type;
225 onc::TranslateStringToONC(onc::kNetworkTypeTable, shill_type, &onc_type); 225 onc::TranslateStringToONC(onc::kNetworkTypeTable, shill_type, &onc_type);
226 return onc_type; 226 return onc_type;
227 } 227 }
228 228
229 } // namespace network_util 229 } // namespace network_util
230 } // namespace chromeos 230 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | chromeos/network/onc/onc_translation_tables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698