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_handler.h" | 5 #include "chromeos/network/network_state_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chromeos/network/device_state.h" | 17 #include "chromeos/network/device_state.h" |
18 #include "chromeos/network/favorite_state.h" | 18 #include "chromeos/network/favorite_state.h" |
19 #include "chromeos/network/managed_state.h" | 19 #include "chromeos/network/managed_state.h" |
20 #include "chromeos/network/network_event_log.h" | 20 #include "chromeos/network/network_event_log.h" |
21 #include "chromeos/network/network_state.h" | 21 #include "chromeos/network/network_state.h" |
22 #include "chromeos/network/network_state_handler_observer.h" | 22 #include "chromeos/network/network_state_handler_observer.h" |
23 #include "chromeos/network/shill_property_handler.h" | 23 #include "chromeos/network/shill_property_handler.h" |
24 #include "chromeos/network/shill_property_util.h" | |
25 #include "third_party/cros_system_api/dbus/service_constants.h" | 24 #include "third_party/cros_system_api/dbus/service_constants.h" |
26 | 25 |
27 namespace chromeos { | 26 namespace chromeos { |
28 | 27 |
29 namespace { | 28 namespace { |
30 | 29 |
31 bool ConnectionStateChanged(NetworkState* network, | 30 bool ConnectionStateChanged(NetworkState* network, |
32 const std::string& prev_connection_state) { | 31 const std::string& prev_connection_state) { |
33 return (network->connection_state() != prev_connection_state) && | 32 return (network->connection_state() != prev_connection_state) && |
34 (network->connection_state() != shill::kStateIdle || | 33 (network->connection_state() != shill::kStateIdle || |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 if (type.MatchesType(shill::kTypeBluetooth)) | 961 if (type.MatchesType(shill::kTypeBluetooth)) |
963 technologies.push_back(new std::string(shill::kTypeBluetooth)); | 962 technologies.push_back(new std::string(shill::kTypeBluetooth)); |
964 if (type.MatchesType(shill::kTypeVPN)) | 963 if (type.MatchesType(shill::kTypeVPN)) |
965 technologies.push_back(new std::string(shill::kTypeVPN)); | 964 technologies.push_back(new std::string(shill::kTypeVPN)); |
966 | 965 |
967 CHECK_GT(technologies.size(), 0ul); | 966 CHECK_GT(technologies.size(), 0ul); |
968 return technologies.Pass(); | 967 return technologies.Pass(); |
969 } | 968 } |
970 | 969 |
971 } // namespace chromeos | 970 } // namespace chromeos |
OLD | NEW |