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

Unified Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 12256049: Don't show the view account button if a cellular network is not connected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/ui/webui/options/chromeos/OWNERS ('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/options/chromeos/internet_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index 9e75a4c44abd2faef4ec8dc0bee9bce3d47e685a..d8e72f2e5aa7732d9a71f69f25396ed8dceaaa3b 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -1561,9 +1561,11 @@ void InternetOptionsHandler::SetCellularButtonsVisibility(
} else {
const chromeos::MobileConfig::Carrier* carrier =
chromeos::MobileConfig::GetInstance()->GetCarrier(carrier_id);
- if (carrier && carrier->show_portal_button()) {
- // This will trigger BuyDataPlanCallback() so that
- // chrome://mobilesetup/ will open carrier specific portal.
+ if (carrier && carrier->show_portal_button() && cellular->connected()) {
+ // This will trigger BuyDataPlanCallback() so that chrome://mobilesetup/
+ // will open carrier specific portal. If the cellular network is not
+ // connected, don't show the view account button since we don't have an
+ // active network to pull the account URL info from.
stevenjb 2013/02/15 00:12:53 Shouldn't we check for cros->connected_network() i
rkc 2013/02/15 00:19:59 We're specifically checking if this cellular netwo
stevenjb 2013/02/15 00:22:52 OK, if it makes sense to ben, it's good enough for
dictionary->SetBoolean(kTagShowViewAccountButton, true);
}
}
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698