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 "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chromeos/device_event_log.h" | |
11 #include "chromeos/network/network_profile_handler.h" | 10 #include "chromeos/network/network_profile_handler.h" |
12 #include "chromeos/network/network_type_pattern.h" | 11 #include "chromeos/network/network_type_pattern.h" |
13 #include "chromeos/network/network_util.h" | 12 #include "chromeos/network/network_util.h" |
14 #include "chromeos/network/onc/onc_utils.h" | 13 #include "chromeos/network/onc/onc_utils.h" |
15 #include "chromeos/network/shill_property_util.h" | 14 #include "chromeos/network/shill_property_util.h" |
| 15 #include "components/device_event_log/device_event_log.h" |
16 #include "third_party/cros_system_api/dbus/service_constants.h" | 16 #include "third_party/cros_system_api/dbus/service_constants.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const char kErrorUnknown[] = "Unknown"; | 20 const char kErrorUnknown[] = "Unknown"; |
21 | 21 |
22 bool ConvertListValueToStringVector(const base::ListValue& string_list, | 22 bool ConvertListValueToStringVector(const base::ListValue& string_list, |
23 std::vector<std::string>* result) { | 23 std::vector<std::string>* result) { |
24 for (size_t i = 0; i < string_list.GetSize(); ++i) { | 24 for (size_t i = 0; i < string_list.GetSize(); ++i) { |
25 std::string str; | 25 std::string str; |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 return IsCaptivePortalState(shill_properties, false /* log */); | 375 return IsCaptivePortalState(shill_properties, false /* log */); |
376 } | 376 } |
377 | 377 |
378 // static | 378 // static |
379 bool NetworkState::ErrorIsValid(const std::string& error) { | 379 bool NetworkState::ErrorIsValid(const std::string& error) { |
380 // Shill uses "Unknown" to indicate an unset or cleared error state. | 380 // Shill uses "Unknown" to indicate an unset or cleared error state. |
381 return !error.empty() && error != kErrorUnknown; | 381 return !error.empty() && error != kErrorUnknown; |
382 } | 382 } |
383 | 383 |
384 } // namespace chromeos | 384 } // namespace chromeos |
OLD | NEW |