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

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

Issue 22950007: Insufficient information on activation details should be handled correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit, added some other changes that fell into this CL. Created 7 years, 4 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
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 69b0dc70562c02695b5ce251f9083c5b3da41aba..baca1b3c24c4df6f1e5b92f0418e013f34b78096 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -1779,6 +1779,16 @@ void PopulateCellularDetails(const NetworkState* cellular,
cellular->activation_state() == flimflam::kActivationStateActivating ||
cellular->IsConnectingState());
+ // Don't show any account management related buttons if the activation
+ // state is unknown or no payment portal URL is available.
+ std::string support_url;
+ if (cellular->activation_state() == flimflam::kActivationStateUnknown ||
+ !dictionary->GetString(kTagSupportUrl, &support_url) ||
+ support_url.empty()) {
+ VLOG(2) << "No support URL is available. Don't display buttons.";
+ return;
+ }
+
if (cellular->activation_state() != flimflam::kActivationStateActivating &&
cellular->activation_state() != flimflam::kActivationStateActivated) {
dictionary->SetBoolean(kTagShowActivateButton, true);

Powered by Google App Engine
This is Rietveld 408576698