| 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/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 return; | 263 return; |
| 264 } | 264 } |
| 265 | 265 |
| 266 if (network->type() == flimflam::kTypeWimax || | 266 if (network->type() == flimflam::kTypeWimax || |
| 267 network->type() == flimflam::kTypeVPN) { | 267 network->type() == flimflam::kTypeVPN) { |
| 268 NetworkConfigView::Show(service_path, parent_window); | 268 NetworkConfigView::Show(service_path, parent_window); |
| 269 return; | 269 return; |
| 270 } | 270 } |
| 271 | 271 |
| 272 if (network->type() == flimflam::kTypeCellular) { | 272 if (network->type() == flimflam::kTypeCellular) { |
| 273 if (network->activation_state() != flimflam::kActivationStateActivated) { | 273 if (network->RequiresActivation()) { |
| 274 ash::network_connect::ActivateCellular(service_path); | 274 ash::network_connect::ActivateCellular(service_path); |
| 275 return; | 275 return; |
| 276 } | 276 } |
| 277 if (network->cellular_out_of_credits()) { | 277 if (network->cellular_out_of_credits()) { |
| 278 ash::network_connect::ShowMobileSetup(service_path); | 278 ash::network_connect::ShowMobileSetup(service_path); |
| 279 return; | 279 return; |
| 280 } | 280 } |
| 281 // No special configure or setup for |network|, show the settings UI. | 281 // No special configure or setup for |network|, show the settings UI. |
| 282 if (LoginState::Get()->IsUserLoggedIn()) | 282 if (LoginState::Get()->IsUserLoggedIn()) |
| 283 ShowNetworkSettingsPage(service_path); | 283 ShowNetworkSettingsPage(service_path); |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1339 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1340 }; | 1340 }; |
| 1341 | 1341 |
| 1342 } // namespace | 1342 } // namespace |
| 1343 | 1343 |
| 1344 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1344 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1345 return new chromeos::SystemTrayDelegate(); | 1345 return new chromeos::SystemTrayDelegate(); |
| 1346 } | 1346 } |
| 1347 | 1347 |
| 1348 } // namespace chromeos | 1348 } // namespace chromeos |
| OLD | NEW |