Comment #1 on issue 8414 by [email protected]: Increase limit in cookie  
count
http://code.google.com/p/chromium/issues/detail?id=8414

This was me, my patch actually increased the initial .reserve() limit for  
the vector
to 2000, and placed no upper limit, only removing cookies when they  
expired.  My
quick patch returns before  // Collect garbage for everything. , so the lru  
access
stuff is never reached.

I was going to run this for awhile to figure out a sane limit, or a better  
policy,
but for now atleast I am not losing my cookies.


Index: cookie_monster.cc
===================================================================
--- cookie_monster.cc   (revision 10910)
+++ cookie_monster.cc   (working copy)
@@ -75,7 +75,7 @@
  // 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 kNumCookiesTotal        = 2000;  // ~1000 cookies
  static const size_t kNumCookiesTotalPurge   = 100;

  // Default minimum delay after updating a cookie's LastAccessDate before we
@@ -572,6 +572,12 @@
          kNumCookiesPerHost, kNumCookiesPerHostPurge);
    }

+  // Collect garbage for expired cookies.
+  num_deleted += GarbageCollectExpired(current,
+    CookieMapItPair(cookies_.begin(), cookies_.end()), NULL);
+
+  return num_deleted;
+
    // Collect garbage for everything.
    if (cookies_.size() > kNumCookiesTotal) {
      COOKIE_DLOG(INFO) << "GarbageCollect() everything";




--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to