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..ef5f192543fba1a632135fc449b94eebf179cc25 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", |
@@ -471,9 +476,12 @@ WebUIMessageHandler* MobileSetupHandler::Attach(WebUI* web_ui) { |
void MobileSetupHandler::Init(TabContents* contents) { |
tab_contents_ = contents; |
+ chromeos::CellularNetwork* network = GetCellularNetwork(service_path_); |
+ if (!network || !network->SupportsActivation()) |
+ return; |
LoadCellularConfig(); |
if (!chromeos::CrosLibrary::Get()->GetNetworkLibrary()->IsLocked()) |
- SetupActivationProcess(GetCellularNetwork(service_path_)); |
+ SetupActivationProcess(network); |
else |
already_running_ = true; |
} |