diff options
author | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 20:34:58 +0000 |
---|---|---|
committer | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 20:34:58 +0000 |
commit | ab31e260f4b37b619fd1c6e990e39197d9f8ba47 (patch) | |
tree | 990baac7067d022c02093b45b143e68da63eba9b /chrome/browser/chromeos/network_message_observer.cc | |
parent | 7600428cfa774cfd645d503b50a3d9b4ce1780ac (diff) | |
download | chromium_src-ab31e260f4b37b619fd1c6e990e39197d9f8ba47.zip chromium_src-ab31e260f4b37b619fd1c6e990e39197d9f8ba47.tar.gz chromium_src-ab31e260f4b37b619fd1c6e990e39197d9f8ba47.tar.bz2 |
[cros] Show data plan info only when cellular network supports that.
BUG=chrome-os-partner:3556
TEST=Manual. No messages like "No data plan" should be shown for GSM networks like AT&T.
Review URL: http://codereview.chromium.org/7003027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/network_message_observer.cc')
-rw-r--r-- | chrome/browser/chromeos/network_message_observer.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/network_message_observer.cc b/chrome/browser/chromeos/network_message_observer.cc index fa5b8cb..9259eea 100644 --- a/chrome/browser/chromeos/network_message_observer.cc +++ b/chrome/browser/chromeos/network_message_observer.cc @@ -208,16 +208,14 @@ void NetworkMessageObserver::OnNetworkManagerChanged(NetworkLibrary* cros) { } void NetworkMessageObserver::OnCellularDataPlanChanged(NetworkLibrary* cros) { - if (!ShouldShowMobilePlanNotifications()) { + if (!ShouldShowMobilePlanNotifications()) return; - } - const CellularNetwork* cellular = cros->cellular_network(); - if (!cellular) + if (!cellular || !cellular->SupportsDataPlan()) return; + const CellularDataPlanVector* plans = cros->GetDataPlans(cellular->service_path()); - // If no plans available, check to see if we need a new plan. if (!plans || plans->empty()) { // If previously, we had low data, we know that a plan was near expiring. |