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

Issue 99100: Update cookie expiry policy to attempt to avoid deleting "in-use" cookies. S... (Closed)

Created:
11 years, 8 months ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
Dean McNamee
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Update cookie expiry policy to attempt to avoid deleting "in-use" cookies. See bug for exact details. BUG=8850 TEST=Covered by unittests

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 7

Patch Set 3 : '' #

Total comments: 3

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -57 lines) Patch
M chrome/common/net/cookie_monster_sqlite.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/net/cookie_monster_sqlite.cc View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M net/base/cookie_monster.h View 1 2 3 3 chunks +12 lines, -7 lines 0 comments Download
M net/base/cookie_monster.cc View 1 2 3 7 chunks +48 lines, -25 lines 0 comments Download
M net/base/cookie_monster_unittest.cc View 1 2 3 1 chunk +55 lines, -23 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Peter Kasting
11 years, 8 months ago (2009-04-27 23:11:31 UTC) #1
Peter Kasting
ping
11 years, 8 months ago (2009-04-28 21:33:24 UTC) #2
Dean McNamee
My comments are all confused across snapshots. Sending this out, and will probably make a ...
11 years, 7 months ago (2009-04-30 13:43:33 UTC) #3
Dean McNamee
Overall I agree that we should do something, but I am scared of change, and ...
11 years, 7 months ago (2009-04-30 13:57:30 UTC) #4
Peter Kasting
11 years, 7 months ago (2009-04-30 13:57:58 UTC) #5
http://codereview.chromium.org/99100/diff/16/20
File chrome/common/net/cookie_monster_sqlite.cc (right):

http://codereview.chromium.org/99100/diff/16/20#newcode323
Line 323: base::Time* least_recent_access) {
On 2009/04/30 13:43:33, Dean McNamee wrote:
> oldest_access ?

I could do that.  Only worry is that it's the oldest "most recent access" so
it's not really a true oldest access... no name seems good here.  Say whatever
you think is clearest and I'll change to it :)

http://codereview.chromium.org/99100/diff/16/21
File chrome/common/net/cookie_monster_sqlite.h (right):

http://codereview.chromium.org/99100/diff/16/21#newcode28
Line 28: base::Time*);
On 2009/04/30 13:43:33, Dean McNamee wrote:
> don't we generally give these names?

We do in most code... I was going by the other virtual functions below (and in
the interface) which didn't.  Should I just update them all to have names?  I'd
be happy with that.

http://codereview.chromium.org/99100/diff/16/19
File net/base/cookie_monster.cc (right):

http://codereview.chromium.org/99100/diff/16/19#newcode75
Line 75: static const double kPurgeOverageFactor = 1.1;
On 2009/04/30 13:43:33, Dean McNamee wrote:
> Overage? I prefer the original code, I don't see a huge benefit from the new
> floating point...

It makes the day calculation a bit trickier to do it the old way (I had it that
way at first and going to this way simplifier things).  At the very least you
want to switch from "max & purge amount" to "max & purge target amount".

TBH I had to wrap my brain around the old algorithm anew every time, this one
seems clearer to me...

Powered by Google App Engine
This is Rietveld 408576698