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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 } 1772 }
1773 } 1773 }
1774 } 1774 }
1775 1775
1776 // Set Cellular Buttons Visibility 1776 // Set Cellular Buttons Visibility
1777 dictionary->SetBoolean( 1777 dictionary->SetBoolean(
1778 kTagDisableConnectButton, 1778 kTagDisableConnectButton,
1779 cellular->activation_state() == flimflam::kActivationStateActivating || 1779 cellular->activation_state() == flimflam::kActivationStateActivating ||
1780 cellular->IsConnectingState()); 1780 cellular->IsConnectingState());
1781 1781
1782 if (cellular->activation_state() == flimflam::kActivationStateUnknown) {
1783 // Don't show any account management related buttons if the activation
1784 // state is unknown and no payment portal URL is available.
1785 std::string url;
stevenjb 2013/08/14 17:48:53 nit: support_url
armansito 2013/08/14 23:12:00 Done.
1786 if (!dictionary->GetString(kTagSupportUrl, &url) || url.empty())
1787 return;
1788 }
1789
1782 if (cellular->activation_state() != flimflam::kActivationStateActivating && 1790 if (cellular->activation_state() != flimflam::kActivationStateActivating &&
1783 cellular->activation_state() != flimflam::kActivationStateActivated) { 1791 cellular->activation_state() != flimflam::kActivationStateActivated) {
1784 dictionary->SetBoolean(kTagShowActivateButton, true); 1792 dictionary->SetBoolean(kTagShowActivateButton, true);
1785 } else { 1793 } else {
1786 const MobileConfig::Carrier* carrier = 1794 const MobileConfig::Carrier* carrier =
1787 MobileConfig::GetInstance()->GetCarrier(carrier_id); 1795 MobileConfig::GetInstance()->GetCarrier(carrier_id);
1788 if (carrier && carrier->show_portal_button()) { 1796 if (carrier && carrier->show_portal_button()) {
1789 // The button should be shown for a LTE network even when the LTE network 1797 // The button should be shown for a LTE network even when the LTE network
1790 // is not connected, but CrOS is online. This is done to enable users to 1798 // is not connected, but CrOS is online. This is done to enable users to
1791 // update their plan even if they are out of credits. 1799 // update their plan even if they are out of credits.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 cellular && cellular->support_network_scan()); 1984 cellular && cellular->support_network_scan());
1977 1985
1978 dictionary->SetBoolean(kTagWimaxAvailable, 1986 dictionary->SetBoolean(kTagWimaxAvailable,
1979 handler->IsTechnologyAvailable(flimflam::kTypeWimax)); 1987 handler->IsTechnologyAvailable(flimflam::kTypeWimax));
1980 dictionary->SetBoolean(kTagWimaxEnabled, 1988 dictionary->SetBoolean(kTagWimaxEnabled,
1981 handler->IsTechnologyEnabled(flimflam::kTypeWimax)); 1989 handler->IsTechnologyEnabled(flimflam::kTypeWimax));
1982 } 1990 }
1983 1991
1984 } // namespace options 1992 } // namespace options
1985 } // namespace chromeos 1993 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698