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) { | |
186 for (CellularNetworkVector::const_iterator it = | 175 for (CellularNetworkVector::const_iterator it = |
187 cros->cellular_networks().begin(); | 176 cros->cellular_networks().begin(); |
188 it != cros->cellular_networks().end(); it++) { | 177 it != cros->cellular_networks().end(); it++) { |
189 const CellularNetwork* net = *it; | 178 const CellularNetwork* net = *it; |
190 if (net->notify_failure()) { | 179 if (net->notify_failure()) { |
191 new_failed_network = net; | 180 new_failed_network = net; |
192 break; // There should only be one failed network. | 181 break; // There should only be one failed network. |
193 } | 182 } |
194 } | 183 } |
195 } | 184 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 if (plan) { | 278 if (plan) { |
290 cellular_data_plan_unique_id_ = plan->GetUniqueIdentifier(); | 279 cellular_data_plan_unique_id_ = plan->GetUniqueIdentifier(); |
291 cellular_data_plan_type_ = plan->plan_type; | 280 cellular_data_plan_type_ = plan->plan_type; |
292 } else { | 281 } else { |
293 cellular_data_plan_unique_id_ = std::string(); | 282 cellular_data_plan_unique_id_ = std::string(); |
294 cellular_data_plan_type_ = CELLULAR_DATA_PLAN_UNKNOWN; | 283 cellular_data_plan_type_ = CELLULAR_DATA_PLAN_UNKNOWN; |
295 } | 284 } |
296 } | 285 } |
297 | 286 |
298 } // namespace chromeos | 287 } // namespace chromeos |
OLD | NEW |