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

Side by Side Diff: chromeos/network/network_state.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
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_state.h" 5 #include "chromeos/network/network_state.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // must replicate that nested structure. 252 // must replicate that nested structure.
253 std::unique_ptr<base::DictionaryValue> provider_property( 253 std::unique_ptr<base::DictionaryValue> provider_property(
254 new base::DictionaryValue); 254 new base::DictionaryValue);
255 provider_property->SetStringWithoutPathExpansion(shill::kTypeProperty, 255 provider_property->SetStringWithoutPathExpansion(shill::kTypeProperty,
256 vpn_provider_type_); 256 vpn_provider_type_);
257 if (vpn_provider_type_ == shill::kProviderThirdPartyVpn) { 257 if (vpn_provider_type_ == shill::kProviderThirdPartyVpn) {
258 provider_property->SetStringWithoutPathExpansion( 258 provider_property->SetStringWithoutPathExpansion(
259 shill::kHostProperty, third_party_vpn_provider_extension_id_); 259 shill::kHostProperty, third_party_vpn_provider_extension_id_);
260 } 260 }
261 dictionary->SetWithoutPathExpansion(shill::kProviderProperty, 261 dictionary->SetWithoutPathExpansion(shill::kProviderProperty,
262 provider_property.release()); 262 std::move(provider_property));
263 } 263 }
264 264
265 // Tether properties 265 // Tether properties
266 if (NetworkTypePattern::Tether().MatchesType(type())) { 266 if (NetworkTypePattern::Tether().MatchesType(type())) {
267 dictionary->SetIntegerWithoutPathExpansion(kTetherBatteryPercentage, 267 dictionary->SetIntegerWithoutPathExpansion(kTetherBatteryPercentage,
268 battery_percentage()); 268 battery_percentage());
269 dictionary->SetStringWithoutPathExpansion(kTetherCarrier, carrier()); 269 dictionary->SetStringWithoutPathExpansion(kTetherCarrier, carrier());
270 dictionary->SetIntegerWithoutPathExpansion(kTetherSignalStrength, 270 dictionary->SetIntegerWithoutPathExpansion(kTetherSignalStrength,
271 signal_strength()); 271 signal_strength());
272 } 272 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 return IsCaptivePortalState(shill_properties, false /* log */); 460 return IsCaptivePortalState(shill_properties, false /* log */);
461 } 461 }
462 462
463 // static 463 // static
464 bool NetworkState::ErrorIsValid(const std::string& error) { 464 bool NetworkState::ErrorIsValid(const std::string& error) {
465 // Shill uses "Unknown" to indicate an unset or cleared error state. 465 // Shill uses "Unknown" to indicate an unset or cleared error state.
466 return !error.empty() && error != kErrorUnknown; 466 return !error.empty() && error != kErrorUnknown;
467 } 467 }
468 468
469 } // namespace chromeos 469 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_configuration_handler_unittest.cc ('k') | chromeos/network/network_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698