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 "chromeos/network/network_type_pattern.h" |
14 #include "third_party/cros_system_api/dbus/service_constants.h" | 14 #include "third_party/cros_system_api/dbus/service_constants.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 | 17 |
18 bool ManagedState::Matches(const NetworkTypePattern& pattern) const { | 18 bool ManagedState::Matches(const NetworkTypePattern& pattern) const { |
19 return pattern.MatchesType(type()); | 19 return pattern.MatchesType(type()); |
20 } | 20 } |
21 | 21 |
22 // static | 22 // static |
23 std::string ManagedState::TypeToString(ManagedType type) { | 23 std::string ManagedState::TypeToString(ManagedType type) { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 return false; | 147 return false; |
148 } | 148 } |
149 new_value = static_cast<uint32>(double_value); | 149 new_value = static_cast<uint32>(double_value); |
150 if (*out_value == new_value) | 150 if (*out_value == new_value) |
151 return false; | 151 return false; |
152 *out_value = new_value; | 152 *out_value = new_value; |
153 return true; | 153 return true; |
154 } | 154 } |
155 | 155 |
156 } // namespace chromeos | 156 } // namespace chromeos |
OLD | NEW |