summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster.h
diff options
context:
space:
mode:
authorrdsmith@google.com <rdsmith@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-18 17:34:28 +0000
committerrdsmith@google.com <rdsmith@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-18 17:34:28 +0000
commit9c2addffef686c093b78e50770efae3c199ea3ff (patch)
tree5b7bbe82a1c1aed66ea72411dc4d78fd42bb1a1f /net/base/cookie_monster.h
parent70d2cf46df412888fd1f1fdb1535c2bc80cbf58c (diff)
downloadchromium_src-9c2addffef686c093b78e50770efae3c199ea3ff.zip
chromium_src-9c2addffef686c093b78e50770efae3c199ea3ff.tar.gz
chromium_src-9c2addffef686c093b78e50770efae3c199ea3ff.tar.bz2
Don't rely on "access_time < Time::Now()" to indicate "all cookies".
The interface to CookieMonster::GarbageCollectDeleteList() was signalling "delete all cookies in list" by specifying "delete all cookies in list with last access time before Now()". This was failing to work properly when the system clock wasn't updated frequently enough (== flaky test) and is also vulnerable to changes in systems clocks. That semantic is now explicitly signalled by a null time. BUG=58197 TEST=net_unittests CookieMonsterTest.* on Win/Linux and CookieMonsterTest.TestHostGarbageCollection (flaky test) repeatedly on Windows. Review URL: http://codereview.chromium.org/3780004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster.h')
-rw-r--r--net/base/cookie_monster.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index 2f18283..cdb508e 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -390,7 +390,8 @@ class CookieMonster : public CookieStore {
// Helper for GarbageCollect(). Deletes all cookies in the list
// that were accessed before |keep_accessed_after|, using DeletionCause
- // |cause|. Returns the number of cookies deleted.
+ // |cause|. If |keep_accessed_after| is null, deletes all cookies in the
+ // list. Returns the number of cookies deleted.
int GarbageCollectDeleteList(const base::Time& current,
const base::Time& keep_accessed_after,
DeletionCause cause,