summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrdsmith@google.com <rdsmith@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 18:15:47 +0000
committerrdsmith@google.com <rdsmith@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 18:15:47 +0000
commit0e92b5fa4d9837066b9c8ae6d36e9ec32174f3cf (patch)
tree86ff317346c0210d3d05f79ef88c16d1ef1dc206
parentf81cce7331b0ab67ff0a3d4794229dcdc658433a (diff)
downloadchromium_src-0e92b5fa4d9837066b9c8ae6d36e9ec32174f3cf.zip
chromium_src-0e92b5fa4d9837066b9c8ae6d36e9ec32174f3cf.tar.gz
chromium_src-0e92b5fa4d9837066b9c8ae6d36e9ec32174f3cf.tar.bz2
Don't use last_access_time vs. Now() comparison to mean "all cookies".
BUG=60015 TEST=net_unittests CookieMonsterTest.* (flakiness was rare enough that the only real test will be committing and seeing if the problem is fixed). Review URL: http://codereview.chromium.org/4131001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64453 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/base/cookie_monster.cc2
-rw-r--r--net/base/cookie_monster_unittest.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index de00016..d3a0f21 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -1067,7 +1067,7 @@ int CookieMonster::GarbageCollect(const Time& current,
Time oldest_safe_cookie(
expiry_and_key_scheme_ == EKS_KEEP_RECENT_AND_PURGE_ETLDP1 ?
(Time::Now() - TimeDelta::FromDays(kSafeFromGlobalPurgeDays)) :
- Time::Now());
+ Time()); // Null time == ignore access time.
int num_evicted = GarbageCollectDeleteList(
current,
oldest_safe_cookie,
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc
index 80d58ed..f4cca57 100644
--- a/net/base/cookie_monster_unittest.cc
+++ b/net/base/cookie_monster_unittest.cc
@@ -1953,8 +1953,7 @@ static net::CookieMonster* CreateMonsterForGC(int num_cookies) {
// get rid of cookies when we should). The perftest is probing for
// whether garbage collection happens when it shouldn't. See comments
// before that test for more details.
-// Flaky as per http://crbug.com/60015
-TEST(CookieMonsterTest, FLAKY_GarbageCollectionTriggers) {
+TEST(CookieMonsterTest, GarbageCollectionTriggers) {
// First we check to make sure that a whole lot of recent cookies
// doesn't get rid of anything after garbage collection is checked for.
{