Chromium Code Reviews| Index: chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc |
| diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc |
| index c61dafb00e88a1bbe75cdd1895869694edc7dd72..e17d95f580d0b3f89f901b47066a48d3d1f2de1d 100644 |
| --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc |
| +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc |
| @@ -402,6 +402,11 @@ void MobileSetupUIHTMLSource::StartDataRequest(const std::string& path, |
| int request_id) { |
| chromeos::CellularNetwork* network = GetCellularNetwork(service_path_); |
| DCHECK(network); |
| + if (!network->SupportsActivation()) { |
| + scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); |
| + SendResponse(request_id, html_bytes); |
| + return; |
| + } |
| DictionaryValue strings; |
| strings.SetString("title", l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE)); |
| strings.SetString("connecting_header", |
| @@ -472,8 +477,11 @@ WebUIMessageHandler* MobileSetupHandler::Attach(WebUI* web_ui) { |
| void MobileSetupHandler::Init(TabContents* contents) { |
| tab_contents_ = contents; |
| LoadCellularConfig(); |
|
zel
2011/07/07 16:30:56
you can probably do all this before you load the c
Nikita (slow)
2011/07/07 16:49:14
Done. At some point I've thought to use some error
|
| + chromeos::CellularNetwork* network = GetCellularNetwork(service_path_); |
| + if (!network || !network->SupportsActivation()) |
| + return; |
| if (!chromeos::CrosLibrary::Get()->GetNetworkLibrary()->IsLocked()) |
| - SetupActivationProcess(GetCellularNetwork(service_path_)); |
| + SetupActivationProcess(network); |
| else |
| already_running_ = true; |
| } |