OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/system/chromeos/network/network_connect.h" | 5 #include "ash/system/chromeos/network/network_connect.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/chromeos/network/network_state_notifier.h" | 8 #include "ash/system/chromeos/network/network_state_notifier.h" |
9 #include "ash/system/system_notifier.h" | 9 #include "ash/system/system_notifier.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
343 } | 343 } |
344 const DeviceState* cellular_device = | 344 const DeviceState* cellular_device = |
345 NetworkHandler::Get()->network_state_handler()-> | 345 NetworkHandler::Get()->network_state_handler()-> |
346 GetDeviceState(cellular->device_path()); | 346 GetDeviceState(cellular->device_path()); |
347 if (!cellular_device) { | 347 if (!cellular_device) { |
348 NET_LOG_ERROR("ActivateCellular with no Device", service_path); | 348 NET_LOG_ERROR("ActivateCellular with no Device", service_path); |
349 return; | 349 return; |
350 } | 350 } |
351 if (!IsDirectActivatedCarrier(cellular_device->carrier())) { | 351 if (!IsDirectActivatedCarrier(cellular_device->carrier())) { |
352 // For non direct activation, show the mobile setup dialog which can be | 352 // For non direct activation, show the mobile setup dialog which can be |
353 // used to activate the network. Only show the dialog, if an account | 353 // used to activate the network. |
354 // management URL is available. | 354 ShowMobileSetup(service_path); |
355 if (!cellular->payment_url().empty()) | |
stevenjb
2013/09/03 23:23:07
This check shouldn't be necessary; MobileSetupUI s
armansito
2013/09/03 23:52:06
I think the main reason for doing this check here
stevenjb
2013/09/04 00:04:50
Is this a scenario that would ever actually happen
armansito
2013/09/04 00:18:14
Yes, it is actually possible for shill not to show
stevenjb
2013/09/04 01:04:11
I'm not really sure that I understand. It doesn't
armansito
2013/09/04 01:35:31
Yes, I agree that this shouldn't be cached. We can
| |
356 ShowMobileSetup(service_path); | |
357 return; | 355 return; |
358 } | 356 } |
359 if (cellular->activation_state() == flimflam::kActivationStateActivated) { | 357 if (cellular->activation_state() == flimflam::kActivationStateActivated) { |
360 NET_LOG_ERROR("ActivateCellular for activated service", service_path); | 358 NET_LOG_ERROR("ActivateCellular for activated service", service_path); |
361 return; | 359 return; |
362 } | 360 } |
363 | 361 |
364 NetworkHandler::Get()->network_activation_handler()->Activate( | 362 NetworkHandler::Get()->network_activation_handler()->Activate( |
365 service_path, | 363 service_path, |
366 "", // carrier | 364 "", // carrier |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
503 | 501 |
504 void ShowNetworkSettings(const std::string& service_path) { | 502 void ShowNetworkSettings(const std::string& service_path) { |
505 if (!ash::Shell::HasInstance()) | 503 if (!ash::Shell::HasInstance()) |
506 return; | 504 return; |
507 ash::Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings( | 505 ash::Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings( |
508 service_path); | 506 service_path); |
509 } | 507 } |
510 | 508 |
511 } // network_connect | 509 } // network_connect |
512 } // ash | 510 } // ash |
OLD | NEW |