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 "chromeos/network/shill_property_util.h" |
13 #include "third_party/cros_system_api/dbus/service_constants.h" | 14 #include "third_party/cros_system_api/dbus/service_constants.h" |
14 | 15 |
15 namespace chromeos { | 16 namespace chromeos { |
16 | 17 |
| 18 bool ManagedState::Matches(const NetworkTypePattern& pattern) const { |
| 19 return pattern.MatchesType(type()); |
| 20 } |
| 21 |
17 ManagedState::ManagedState(ManagedType type, const std::string& path) | 22 ManagedState::ManagedState(ManagedType type, const std::string& path) |
18 : managed_type_(type), | 23 : managed_type_(type), |
19 path_(path), | 24 path_(path), |
20 update_received_(false), | 25 update_received_(false), |
21 update_requested_(false) { | 26 update_requested_(false) { |
22 } | 27 } |
23 | 28 |
24 ManagedState::~ManagedState() { | 29 ManagedState::~ManagedState() { |
25 } | 30 } |
26 | 31 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 return false; | 129 return false; |
125 } | 130 } |
126 new_value = static_cast<uint32>(double_value); | 131 new_value = static_cast<uint32>(double_value); |
127 if (*out_value == new_value) | 132 if (*out_value == new_value) |
128 return false; | 133 return false; |
129 *out_value = new_value; | 134 *out_value = new_value; |
130 return true; | 135 return true; |
131 } | 136 } |
132 | 137 |
133 } // namespace chromeos | 138 } // namespace chromeos |
OLD | NEW |