Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1304)

Unified Diff: chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc

Issue 7313005: [cros] Hide chrome://mobilesetup content on non-supported networks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698