| OLD | NEW |
| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } | 260 } |
| 261 dictionary->SetWithoutPathExpansion(shill::kProviderProperty, | 261 dictionary->SetWithoutPathExpansion(shill::kProviderProperty, |
| 262 provider_property.release()); | 262 provider_property.release()); |
| 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->SetBooleanWithoutPathExpansion( |
| 271 kTetherHasConnectedToHost, has_connected_as_tether_client()); |
| 270 dictionary->SetIntegerWithoutPathExpansion(kTetherSignalStrength, | 272 dictionary->SetIntegerWithoutPathExpansion(kTetherSignalStrength, |
| 271 signal_strength()); | 273 signal_strength()); |
| 272 } | 274 } |
| 273 | 275 |
| 274 // Wireless properties | 276 // Wireless properties |
| 275 if (!NetworkTypePattern::Wireless().MatchesType(type())) | 277 if (!NetworkTypePattern::Wireless().MatchesType(type())) |
| 276 return; | 278 return; |
| 277 | 279 |
| 278 if (visible()) { | 280 if (visible()) { |
| 279 dictionary->SetBooleanWithoutPathExpansion(shill::kConnectableProperty, | 281 dictionary->SetBooleanWithoutPathExpansion(shill::kConnectableProperty, |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 return IsCaptivePortalState(shill_properties, false /* log */); | 462 return IsCaptivePortalState(shill_properties, false /* log */); |
| 461 } | 463 } |
| 462 | 464 |
| 463 // static | 465 // static |
| 464 bool NetworkState::ErrorIsValid(const std::string& error) { | 466 bool NetworkState::ErrorIsValid(const std::string& error) { |
| 465 // Shill uses "Unknown" to indicate an unset or cleared error state. | 467 // Shill uses "Unknown" to indicate an unset or cleared error state. |
| 466 return !error.empty() && error != kErrorUnknown; | 468 return !error.empty() && error != kErrorUnknown; |
| 467 } | 469 } |
| 468 | 470 |
| 469 } // namespace chromeos | 471 } // namespace chromeos |
| OLD | NEW |