| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 connection_type_ = new_connection_type; | 189 connection_type_ = new_connection_type; |
| 190 service_path_ = default_network->path(); | 190 service_path_ = default_network->path(); |
| 191 ip_address_ = default_network->ip_address(); | 191 ip_address_ = default_network->ip_address(); |
| 192 dns_servers_ = default_network->dns_servers(); | 192 dns_servers_ = default_network->dns_servers(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 // static | 195 // static |
| 196 net::NetworkChangeNotifier::ConnectionType | 196 net::NetworkChangeNotifier::ConnectionType |
| 197 NetworkChangeNotifierChromeos::ConnectionTypeFromShill( | 197 NetworkChangeNotifierChromeos::ConnectionTypeFromShill( |
| 198 const std::string& type, const std::string& technology) { | 198 const std::string& type, const std::string& technology) { |
| 199 if (type == flimflam::kTypeEthernet) | 199 if (type == flimflam::kTypeEthernet || type == shill::kTypeEthernetEap) |
| 200 return CONNECTION_ETHERNET; | 200 return CONNECTION_ETHERNET; |
| 201 else if (type == flimflam::kTypeWifi) | 201 else if (type == flimflam::kTypeWifi) |
| 202 return CONNECTION_WIFI; | 202 return CONNECTION_WIFI; |
| 203 else if (type == flimflam::kTypeWimax) | 203 else if (type == flimflam::kTypeWimax) |
| 204 return CONNECTION_4G; | 204 return CONNECTION_4G; |
| 205 | 205 |
| 206 if (type != flimflam::kTypeCellular) | 206 if (type != flimflam::kTypeCellular) |
| 207 return CONNECTION_UNKNOWN; | 207 return CONNECTION_UNKNOWN; |
| 208 | 208 |
| 209 // For cellular types, mapping depends on the technology. | 209 // For cellular types, mapping depends on the technology. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 229 // produce a single signal when switching between network connections. | 229 // produce a single signal when switching between network connections. |
| 230 params.ip_address_offline_delay_ = base::TimeDelta::FromMilliseconds(4000); | 230 params.ip_address_offline_delay_ = base::TimeDelta::FromMilliseconds(4000); |
| 231 params.ip_address_online_delay_ = base::TimeDelta::FromMilliseconds(1000); | 231 params.ip_address_online_delay_ = base::TimeDelta::FromMilliseconds(1000); |
| 232 params.connection_type_offline_delay_ = | 232 params.connection_type_offline_delay_ = |
| 233 base::TimeDelta::FromMilliseconds(500); | 233 base::TimeDelta::FromMilliseconds(500); |
| 234 params.connection_type_online_delay_ = base::TimeDelta::FromMilliseconds(500); | 234 params.connection_type_online_delay_ = base::TimeDelta::FromMilliseconds(500); |
| 235 return params; | 235 return params; |
| 236 } | 236 } |
| 237 | 237 |
| 238 } // namespace chromeos | 238 } // namespace chromeos |
| OLD | NEW |