summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-03 18:20:14 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-03 18:20:14 +0000
commit4823476a0b56e311289c85023decaa2f9695c7be (patch)
treeb88dd1dbb89152462f8488b18c2b60784a25acff /net
parent2f048d4875358357f7a067ced6eaf570d145fda7 (diff)
downloadchromium_src-4823476a0b56e311289c85023decaa2f9695c7be.zip
chromium_src-4823476a0b56e311289c85023decaa2f9695c7be.tar.gz
chromium_src-4823476a0b56e311289c85023decaa2f9695c7be.tar.bz2
Increase cookie limit to 3000. This matches Firefox 3.5 and Firefox trunk.BUG=8850
Review URL: http://codereview.chromium.org/118011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/cookie_monster.cc4
-rw-r--r--net/base/cookie_monster_unittest.cc8
2 files changed, 6 insertions, 6 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 470bfc2..00696fe 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -74,8 +74,8 @@ namespace net {
// going through the garbage collection process less often.
static const size_t kNumCookiesPerHost = 70; // ~50 cookies
static const size_t kNumCookiesPerHostPurge = 20;
-static const size_t kNumCookiesTotal = 1100; // ~1000 cookies
-static const size_t kNumCookiesTotalPurge = 100;
+static const size_t kNumCookiesTotal = 3300; // ~3000 cookies
+static const size_t kNumCookiesTotalPurge = 300;
// Default minimum delay after updating a cookie's LastAccessDate before we
// will update it again.
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc
index 5ca3e76..d650d0f 100644
--- a/net/base/cookie_monster_unittest.cc
+++ b/net/base/cookie_monster_unittest.cc
@@ -854,7 +854,7 @@ TEST(CookieMonsterTest, TestTotalGarbageCollection) {
net::CookieMonster cm(kLastAccessThresholdSeconds);
// Add a bunch of cookies on a bunch of host, some should get purged.
const GURL sticky_cookie("http://a0000.izzle");
- for (int i = 0; i < 2000; ++i) {
+ for (int i = 0; i < 4000; ++i) {
GURL url(StringPrintf("http://a%04d.izzle", i));
EXPECT_TRUE(cm.SetCookie(url, "a=b"));
EXPECT_EQ("a=b", cm.GetCookies(url));
@@ -869,12 +869,12 @@ TEST(CookieMonsterTest, TestTotalGarbageCollection) {
}
// Check that cookies that still exist.
- for (int i = 0; i < 2000; ++i) {
+ for (int i = 0; i < 4000; ++i) {
GURL url(StringPrintf("http://a%04d.izzle", i));
- if ((i == 0) || (i > 1101)) {
+ if ((i == 0) || (i > 1001)) {
// Cookies should still be around.
EXPECT_FALSE(cm.GetCookies(url).empty());
- } else if (i < 901) {
+ } else if (i < 701) {
// Cookies should have gotten purged.
EXPECT_TRUE(cm.GetCookies(url).empty());
}