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

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

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 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
« no previous file with comments | « chromeos/network/network_ui_data.cc ('k') | chromeos/network/onc/onc_mapper.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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const DeviceState* device = 172 const DeviceState* device =
173 NetworkHandler::Get()->network_state_handler()->GetDeviceState( 173 NetworkHandler::Get()->network_state_handler()->GetDeviceState(
174 network->device_path()); 174 network->device_path());
175 if (device) { 175 if (device) {
176 std::unique_ptr<base::DictionaryValue> device_dict( 176 std::unique_ptr<base::DictionaryValue> device_dict(
177 new base::DictionaryValue); 177 new base::DictionaryValue);
178 device_dict->SetBooleanWithoutPathExpansion( 178 device_dict->SetBooleanWithoutPathExpansion(
179 shill::kProviderRequiresRoamingProperty, 179 shill::kProviderRequiresRoamingProperty,
180 device->provider_requires_roaming()); 180 device->provider_requires_roaming());
181 shill_dictionary->SetWithoutPathExpansion(shill::kDeviceProperty, 181 shill_dictionary->SetWithoutPathExpansion(shill::kDeviceProperty,
182 device_dict.release()); 182 std::move(device_dict));
183 } 183 }
184 } 184 }
185 185
186 // NetworkState is always associated with the primary user profile, regardless 186 // NetworkState is always associated with the primary user profile, regardless
187 // of what profile is associated with the page that calls this method. We do 187 // of what profile is associated with the page that calls this method. We do
188 // not expose any sensitive properties in the resulting dictionary, it is 188 // not expose any sensitive properties in the resulting dictionary, it is
189 // only used to show connection state and icons. 189 // only used to show connection state and icons.
190 std::string user_id_hash = chromeos::LoginState::Get()->primary_user_hash(); 190 std::string user_id_hash = chromeos::LoginState::Get()->primary_user_hash();
191 ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; 191 ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE;
192 NetworkHandler::Get() 192 NetworkHandler::Get()
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 std::string TranslateShillTypeToONC(const std::string& shill_type) { 228 std::string TranslateShillTypeToONC(const std::string& shill_type) {
229 if (shill_type == shill::kTypeEthernet) 229 if (shill_type == shill::kTypeEthernet)
230 return ::onc::network_type::kEthernet; 230 return ::onc::network_type::kEthernet;
231 std::string onc_type; 231 std::string onc_type;
232 onc::TranslateStringToONC(onc::kNetworkTypeTable, shill_type, &onc_type); 232 onc::TranslateStringToONC(onc::kNetworkTypeTable, shill_type, &onc_type);
233 return onc_type; 233 return onc_type;
234 } 234 }
235 235
236 } // namespace network_util 236 } // namespace network_util
237 } // namespace chromeos 237 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_ui_data.cc ('k') | chromeos/network/onc/onc_mapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698