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

Issue 3070001: Fixes targeting the unique creation times invariant in the CookieMonster: (Closed)

Created:
10 years, 5 months ago by Randy Smith (Not in Mondays)
Modified:
9 years, 7 months ago
Reviewers:
eroman, ahendrickson
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fixes targeting the unique creation times invariant in the CookieMonster: * Make sure we don't import cookies with identical creation times. * DCHECK that duplicate cookie list insertion succeeds (it silently didn't when there were not unique creation times.) * Confirm that we eliminate all the duplicats we find on cookie import. * Make Methods allowing setting of creation time private. * Create performance test for import (involved refactoring backing store mock.) This change does increase the performance cost on import, and hence adds to startup time. However, the increase for importing 15000 cookies was only 5 ms, so I think that's acceptable to prevent crashes. rdsmith-macbookpro:~/tmp $ perfparse base_perf_import.txt new_perf_import.txt base_perf_import.txt new_perf_import.txt CookieMonsterTest.TestImport Cookie_monster_import_from_store 26.36 +/- 0.88 31.38 +/- 1.1 BUG=43188 TEST=net_unittest --gtest_filter=CookieMonsterTest.* (including two new tests.), Linux & Windows Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=53957

Patch Set 1 #

Patch Set 2 : Fixed duplicate creation times bug in unit test, tweaked formatting. #

Total comments: 32

Patch Set 3 : Made creation times in perftest unique. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+405 lines, -171 lines) Patch
M net/base/cookie_monster.h View 1 2 4 chunks +18 lines, -12 lines 0 comments Download
M net/base/cookie_monster.cc View 1 2 8 chunks +49 lines, -13 lines 2 comments Download
M net/base/cookie_monster_perftest.cc View 1 2 2 chunks +37 lines, -3 lines 0 comments Download
A net/base/cookie_monster_store_test.h View 1 2 1 chunk +151 lines, -0 lines 0 comments Download
M net/base/cookie_monster_unittest.cc View 1 2 9 chunks +150 lines, -143 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Randy Smith (Not in Mondays)
Eric, Andy: Could you take a look at this? I think I've finally found root ...
10 years, 5 months ago (2010-07-26 18:10:53 UTC) #1
eroman
LGTM. do we have a separate issue for how the sqlite DB can get wedged ...
10 years, 5 months ago (2010-07-26 18:53:55 UTC) #2
ahendrickson
LGTM. http://codereview.chromium.org/3070001/diff/17001/18001 File net/base/cookie_monster.cc (right): http://codereview.chromium.org/3070001/diff/17001/18001#newcode1061 net/base/cookie_monster.cc:1061: AutoLock autolock(lock_); I'm curious about why you moved ...
10 years, 5 months ago (2010-07-27 19:15:37 UTC) #3
Randy Smith (Not in Mondays)
Thanks! (Publishing just to respond to comments; will be committing now.) http://codereview.chromium.org/3070001/diff/2001/3001 File net/base/cookie_monster.cc (right): ...
10 years, 5 months ago (2010-07-27 20:11:47 UTC) #4
eroman
10 years, 4 months ago (2010-07-28 00:02:23 UTC) #5
lgtm

Powered by Google App Engine
This is Rietveld 408576698