| 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/managed_state.h" | 5 #include "chromeos/network/managed_state.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chromeos/network/device_state.h" | 9 #include "chromeos/network/device_state.h" |
| 10 #include "chromeos/network/favorite_state.h" | 10 #include "chromeos/network/favorite_state.h" |
| 11 #include "chromeos/network/network_event_log.h" | 11 #include "chromeos/network/network_event_log.h" |
| 12 #include "chromeos/network/network_state.h" | 12 #include "chromeos/network/network_state.h" |
| 13 #include "third_party/cros_system_api/dbus/service_constants.h" | 13 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 | 16 |
| 17 bool ManagedState::IsTypeEthernet() const { |
| 18 return type_ == flimflam::kTypeEthernet || type_ == shill::kTypeEthernetEap; |
| 19 } |
| 20 |
| 17 ManagedState::ManagedState(ManagedType type, const std::string& path) | 21 ManagedState::ManagedState(ManagedType type, const std::string& path) |
| 18 : managed_type_(type), | 22 : managed_type_(type), |
| 19 path_(path), | 23 path_(path), |
| 20 update_received_(false), | 24 update_received_(false), |
| 21 update_requested_(false) { | 25 update_requested_(false) { |
| 22 } | 26 } |
| 23 | 27 |
| 24 ManagedState::~ManagedState() { | 28 ManagedState::~ManagedState() { |
| 25 } | 29 } |
| 26 | 30 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 return false; | 128 return false; |
| 125 } | 129 } |
| 126 new_value = static_cast<uint32>(double_value); | 130 new_value = static_cast<uint32>(double_value); |
| 127 if (*out_value == new_value) | 131 if (*out_value == new_value) |
| 128 return false; | 132 return false; |
| 129 *out_value = new_value; | 133 *out_value = new_value; |
| 130 return true; | 134 return true; |
| 131 } | 135 } |
| 132 | 136 |
| 133 } // namespace chromeos | 137 } // namespace chromeos |
| OLD | NEW |