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 "chrome/browser/chromeos/network_message_observer.h" | 5 #include "chrome/browser/chromeos/network_message_observer.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 for (WifiNetworkVector::const_iterator it = cros->wifi_networks().begin(); | 165 for (WifiNetworkVector::const_iterator it = cros->wifi_networks().begin(); |
166 it != cros->wifi_networks().end(); it++) { | 166 it != cros->wifi_networks().end(); it++) { |
167 const WifiNetwork* net = *it; | 167 const WifiNetwork* net = *it; |
168 if (net->notify_failure()) { | 168 if (net->notify_failure()) { |
169 new_failed_network = net; | 169 new_failed_network = net; |
170 break; // There should only be one failed network. | 170 break; // There should only be one failed network. |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 if (!new_failed_network) { | 174 if (!new_failed_network) { |
| 175 for (WimaxNetworkVector::const_iterator it = cros->wimax_networks().begin(); |
| 176 it != cros->wimax_networks().end(); ++it) { |
| 177 const WimaxNetwork* net = *it; |
| 178 if (net->notify_failure()) { |
| 179 new_failed_network = net; |
| 180 break; // There should only be one failed network. |
| 181 } |
| 182 } |
| 183 } |
| 184 |
| 185 if (!new_failed_network) { |
175 for (CellularNetworkVector::const_iterator it = | 186 for (CellularNetworkVector::const_iterator it = |
176 cros->cellular_networks().begin(); | 187 cros->cellular_networks().begin(); |
177 it != cros->cellular_networks().end(); it++) { | 188 it != cros->cellular_networks().end(); it++) { |
178 const CellularNetwork* net = *it; | 189 const CellularNetwork* net = *it; |
179 if (net->notify_failure()) { | 190 if (net->notify_failure()) { |
180 new_failed_network = net; | 191 new_failed_network = net; |
181 break; // There should only be one failed network. | 192 break; // There should only be one failed network. |
182 } | 193 } |
183 } | 194 } |
184 } | 195 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 if (plan) { | 289 if (plan) { |
279 cellular_data_plan_unique_id_ = plan->GetUniqueIdentifier(); | 290 cellular_data_plan_unique_id_ = plan->GetUniqueIdentifier(); |
280 cellular_data_plan_type_ = plan->plan_type; | 291 cellular_data_plan_type_ = plan->plan_type; |
281 } else { | 292 } else { |
282 cellular_data_plan_unique_id_ = std::string(); | 293 cellular_data_plan_unique_id_ = std::string(); |
283 cellular_data_plan_type_ = CELLULAR_DATA_PLAN_UNKNOWN; | 294 cellular_data_plan_type_ = CELLULAR_DATA_PLAN_UNKNOWN; |
284 } | 295 } |
285 } | 296 } |
286 | 297 |
287 } // namespace chromeos | 298 } // namespace chromeos |
OLD | NEW |