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/device_state.h" | 5 #include "chromeos/network/device_state.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chromeos/network/network_event_log.h" | 11 #include "chromeos/network/network_event_log.h" |
12 #include "chromeos/network/shill_property_util.h" | 12 #include "chromeos/network/shill_property_util.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 DeviceState::DeviceState(const std::string& path) | 17 DeviceState::DeviceState(const std::string& path) |
18 : ManagedState(MANAGED_TYPE_DEVICE, path), | 18 : ManagedState(MANAGED_TYPE_DEVICE, path), |
19 allow_roaming_(false), | 19 allow_roaming_(false), |
20 provider_requires_roaming_(false), | 20 provider_requires_roaming_(false), |
21 support_network_scan_(false), | 21 support_network_scan_(false), |
22 scanning_(false), | 22 scanning_(false), |
| 23 sim_retries_left_(0), |
23 sim_lock_enabled_(false), | 24 sim_lock_enabled_(false), |
24 sim_present_(true), | 25 sim_present_(true), |
25 eap_authentication_completed_(false) { | 26 eap_authentication_completed_(false) { |
26 } | 27 } |
27 | 28 |
28 DeviceState::~DeviceState() { | 29 DeviceState::~DeviceState() { |
29 } | 30 } |
30 | 31 |
31 bool DeviceState::PropertyChanged(const std::string& key, | 32 bool DeviceState::PropertyChanged(const std::string& key, |
32 const base::Value& value) { | 33 const base::Value& value) { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ip_configs_.SetWithoutPathExpansion(ip_config_path, ip_config); | 138 ip_configs_.SetWithoutPathExpansion(ip_config_path, ip_config); |
138 } | 139 } |
139 ip_config->MergeDictionary(&properties); | 140 ip_config->MergeDictionary(&properties); |
140 } | 141 } |
141 | 142 |
142 bool DeviceState::IsSimAbsent() const { | 143 bool DeviceState::IsSimAbsent() const { |
143 return technology_family_ == shill::kTechnologyFamilyGsm && !sim_present_; | 144 return technology_family_ == shill::kTechnologyFamilyGsm && !sim_present_; |
144 } | 145 } |
145 | 146 |
146 } // namespace chromeos | 147 } // namespace chromeos |
OLD | NEW |