| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 service_path_.clear(); | 128 service_path_.clear(); |
| 129 ip_address_.clear(); | 129 ip_address_.clear(); |
| 130 dns_servers_.clear(); | 130 dns_servers_.clear(); |
| 131 } | 131 } |
| 132 return; | 132 return; |
| 133 } | 133 } |
| 134 | 134 |
| 135 // We do have a default network and it is connected. | 135 // We do have a default network and it is connected. |
| 136 net::NetworkChangeNotifier::ConnectionType new_connection_type = | 136 net::NetworkChangeNotifier::ConnectionType new_connection_type = |
| 137 ConnectionTypeFromShill(default_network->type(), | 137 ConnectionTypeFromShill(default_network->type(), |
| 138 default_network->technology()); | 138 default_network->network_technology()); |
| 139 if (new_connection_type != connection_type_) { | 139 if (new_connection_type != connection_type_) { |
| 140 NET_LOG_EVENT( | 140 NET_LOG_EVENT( |
| 141 "NCNDefaultConnectionTypeChanged", | 141 "NCNDefaultConnectionTypeChanged", |
| 142 base::StringPrintf("%s -> %s", | 142 base::StringPrintf("%s -> %s", |
| 143 ConnectionTypeToString(connection_type_), | 143 ConnectionTypeToString(connection_type_), |
| 144 ConnectionTypeToString(new_connection_type))); | 144 ConnectionTypeToString(new_connection_type))); |
| 145 *connection_type_changed = true; | 145 *connection_type_changed = true; |
| 146 } | 146 } |
| 147 if (default_network->path() != service_path_) { | 147 if (default_network->path() != service_path_) { |
| 148 NET_LOG_EVENT( | 148 NET_LOG_EVENT( |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |