summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorchocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 21:26:29 +0000
committerchocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 21:26:29 +0000
commit2c6b521e275b8145e2546fb12404aceaed60cbcb (patch)
treeb548dda69234e66fc63545095d22988b6a199f7e /chrome
parent310bed51830d9cd367597ae58be2b10c9ee3b938 (diff)
downloadchromium_src-2c6b521e275b8145e2546fb12404aceaed60cbcb.zip
chromium_src-2c6b521e275b8145e2546fb12404aceaed60cbcb.tar.gz
chromium_src-2c6b521e275b8145e2546fb12404aceaed60cbcb.tar.bz2
Make cellular plans list not show stale plans.
BUG=chromium-os:13393 TEST=After 24 hours of an unlimited plan, make sure that the options page for the cellular network shows no plans. See bug. Review URL: http://codereview.chromium.org/6984001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chromeos/cros/network_library.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc
index 47f96fc..c8e5656 100644
--- a/chrome/browser/chromeos/cros/network_library.cc
+++ b/chrome/browser/chromeos/cros/network_library.cc
@@ -2354,9 +2354,13 @@ class NetworkLibraryImpl : public NetworkLibrary {
virtual const CellularDataPlanVector* GetDataPlans(
const std::string& path) const {
CellularDataPlanMap::const_iterator iter = data_plan_map_.find(path);
- if (iter != data_plan_map_.end())
- return iter->second;
- return NULL;
+ if (iter == data_plan_map_.end())
+ return NULL;
+ // If we need a new plan, then ignore any data plans we have.
+ CellularNetwork* cellular = FindCellularNetworkByPath(path);
+ if (cellular && cellular->needs_new_plan())
+ return NULL;
+ return iter->second;
}
virtual const CellularDataPlan* GetSignificantDataPlan(