summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* The change list splits loading of cookies from DB by the domain key(eTLD+1).guohui@google.com2011-10-171-21/+67
| | | | | | | | | | BUG=52909 TEST=NONE TBR=rdsmith@chromium.org Review URL: http://codereview.chromium.org/8318006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105836 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 105639 - The change list splits loading of cookies from DB by the ↵guohui@chromium.org2011-10-151-67/+21
| | | | | | | | | | | | | | | | | domain key(eTLD+1). BUG=52909 TEST=NONE Review URL: http://codereview.chromium.org/7864008 TBR=guohui@google.com Review URL: http://codereview.chromium.org/8289028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105640 0039d316-1c4b-4281-b951-d872f2087c98
* The change list splits loading of cookies from DB by the domain key(eTLD+1).guohui@google.com2011-10-151-21/+67
| | | | | | | | BUG=52909 TEST=NONE Review URL: http://codereview.chromium.org/7864008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105639 0039d316-1c4b-4281-b951-d872f2087c98
* Third try at committing this.erikwright@chromium.org2011-09-131-242/+711
| | | | | | | | | | | | | | | | | | Patchset 1 is the original patch ( http://codereview.chromium.org/7833042/ ). Patchset 2 is the original patch plus a fix to a memory leak from the initial commit ( http://codereview.chromium.org/7831056/ ) On the first try there was a memory leak in a test. I fixed that, but made a mistake in the commit (the committed code did not correspond to the reviewed code). Both commits were reverted. I then landed a new CL ( http://codereview.chromium.org/7860039/ ) that contained the correct changes combining the first two CLs. This caused an error in heapchecker for which a suppression has subsequently been defined ( http://codereview.chromium.org/7780010 ). In summary, all of this is reviewed, minus some lint fixes. BUG=68657 TEST=net_unittests / DeferredCookieTaskTest.* and CookieMonsterTest.* TBR=estade Review URL: http://codereview.chromium.org/7891008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100932 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100415 - Re-land http://codereview.chromium.org/7831056/ and ↵erikwright@chromium.org2011-09-091-711/+242
| | | | | | | | | | | | | | | | | | | | | http://codereview.chromium.org/7833042/ . Finalize a CL originally by departed intern ycxiao@ that detaches the loading of cookies from the IO thread. They are now loaded on the DB thread. Cookie operations received in the meantime are queued and executed, on the IO thread, in the order they were received, when loading completes. A few straggler clients are updated to use the asynchronous CookieStore/CookieMonster API as part of this CL, as the synchronous API is removed. This entire CL has been previously reviewed by the appropriate owners, however an error was made during the submit. BUG=68657 TEST=net_unittests / DeferredCookieTaskTest.* and CookieMonsterTest.* Review URL: http://codereview.chromium.org/7860039 TBR=erikwright@chromium.org Review URL: http://codereview.chromium.org/7862002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100460 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land http://codereview.chromium.org/7831056/ and ↵erikwright@chromium.org2011-09-091-242/+711
| | | | | | | | | | | | | | | | | | http://codereview.chromium.org/7833042/ . Finalize a CL originally by departed intern ycxiao@ that detaches the loading of cookies from the IO thread. They are now loaded on the DB thread. Cookie operations received in the meantime are queued and executed, on the IO thread, in the order they were received, when loading completes. A few straggler clients are updated to use the asynchronous CookieStore/CookieMonster API as part of this CL, as the synchronous API is removed. This entire CL has been previously reviewed by the appropriate owners, however an error was made during the submit. BUG=68657 TEST=net_unittests / DeferredCookieTaskTest.* and CookieMonsterTest.* Review URL: http://codereview.chromium.org/7860039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100415 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100188 - Finalize a CL originally by departed intern ycxiao@ that ↵estade@chromium.org2011-09-091-710/+242
| | | | | | | | | | | | | | | | | | detaches the loading of cookies from the IO thread. They are now loaded on the DB thread. Cookie operations received in the meantime are queued and executed, on the IO thread, in the order they were received, when loading completes. A few straggler clients are updated to use the asynchronous CookieStore/CookieMonster API as part of this CL, as the synchronous API is removed. BUG=68657 TEST=net_unittests / DeferredCookieTaskTest.* and CookieMonsterTest.* Review URL: http://codereview.chromium.org/7833042 TBR=erikwright@chromium.org Review URL: http://codereview.chromium.org/7860026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100335 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100316 - Fix a memory leak in a unit test.estade@chromium.org2011-09-091-4/+3
| | | | | | | | | | | | | | | | | | | In the DeferredDeleteCanonicalCookie test, we were using an existing helper method that initialized a CanonicalCookie on the heap and put a pointer to it in a list. This makes sense for other tests because they provide that list to the CookieMonster, which takes ownership of the list. In this case, we only needed one cookie, which we pass by reference to the CookieMonster via a method that does not take ownership. Yet, it's enough of a hassle to create the cookie that I used this method. The result is that no-one deletes the cookie from the heap. I extracted the existing code that prepared the cookie, so that one can create either a single cookie or a list of them. BUG=68657 TEST=net_unittests / DeferredDeleteCanonicalCookie Review URL: http://codereview.chromium.org/7831056 TBR=erikwright@chromium.org Review URL: http://codereview.chromium.org/7857023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100332 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak in a unit test.erikwright@chromium.org2011-09-091-3/+4
| | | | | | | | | | | | | | | | In the DeferredDeleteCanonicalCookie test, we were using an existing helper method that initialized a CanonicalCookie on the heap and put a pointer to it in a list. This makes sense for other tests because they provide that list to the CookieMonster, which takes ownership of the list. In this case, we only needed one cookie, which we pass by reference to the CookieMonster via a method that does not take ownership. Yet, it's enough of a hassle to create the cookie that I used this method. The result is that no-one deletes the cookie from the heap. I extracted the existing code that prepared the cookie, so that one can create either a single cookie or a list of them. BUG=68657 TEST=net_unittests / DeferredDeleteCanonicalCookie Review URL: http://codereview.chromium.org/7831056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100316 0039d316-1c4b-4281-b951-d872f2087c98
* Finalize a CL originally by departed intern ycxiao@ that detaches the ↵erikwright@chromium.org2011-09-081-242/+710
| | | | | | | | | | | | | | | loading of cookies from the IO thread. They are now loaded on the DB thread. Cookie operations received in the meantime are queued and executed, on the IO thread, in the order they were received, when loading completes. A few straggler clients are updated to use the asynchronous CookieStore/CookieMonster API as part of this CL, as the synchronous API is removed. BUG=68657 TEST=net_unittests / DeferredCookieTaskTest.* and CookieMonsterTest.* Review URL: http://codereview.chromium.org/7833042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100188 0039d316-1c4b-4281-b951-d872f2087c98
* Update asynchronous CookieMonster API to login_utils.ycxiao@chromium.org2011-08-121-7/+8
| | | | | | | | | | | | | | BUG=68657 TEST=CookieMonsterTest.InitializeFromCookieMonster Moving here from http://codereview.chromium.org/7541021/ TBR=rdsmith TBR=zel Review URL: http://codereview.chromium.org/7599025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96607 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 95825 - Update asynchronous CookieMonster API to login_utils.fischman@chromium.org2011-08-081-8/+7
| | | | | | | | | | | | BUG=68657 TEST=CookieMonsterTest.InitializeFromCookieMonster Review URL: http://codereview.chromium.org/7541021 TBR=ycxiao@chromium.org Review URL: http://codereview.chromium.org/7595007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95826 0039d316-1c4b-4281-b951-d872f2087c98
* Update asynchronous CookieMonster API to login_utils.ycxiao@chromium.org2011-08-081-7/+8
| | | | | | | | | BUG=68657 TEST=CookieMonsterTest.InitializeFromCookieMonster Review URL: http://codereview.chromium.org/7541021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95825 0039d316-1c4b-4281-b951-d872f2087c98
* Cookie transfer for initial account creation case on ChromeOS. zelidrag@chromium.org2011-07-201-0/+37
| | | | | | | | BUG=chromium-os:17470 TEST=CookieMonsterTest.InitializeFromCookieMonster Review URL: http://codereview.chromium.org/7397007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93140 0039d316-1c4b-4281-b951-d872f2087c98
* Define an asynchronous API for CookieStore.ycxiao@chromium.org2011-07-121-547/+1211
| | | | | | | | | BUG=68657 TEST=xxxx Review URL: http://codereview.chromium.org/7155026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92150 0039d316-1c4b-4281-b951-d872f2087c98
* MAC Cookies (patch 5 of N)abarth@chromium.org2011-05-161-2/+0
| | | | | | | | | | | To help folks deal with clock skew, we've changed the timestamp to the "age" of the credential, which is the number of seconds since the cookie was set (as opposed to the number of seconds since the epoch). This patch updates our implementation to match. Review URL: http://codereview.chromium.org/6969075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85542 0039d316-1c4b-4281-b951-d872f2087c98
* MAC Cookies (patch 3 of N)abarth@chromium.org2011-05-121-0/+31
| | | | | | | | | | Prepare the cookie monster for MAC cookies. According to the perftests in this patch, the change to the cookie monster has a small but measurable effect (83.963ms => 88.299ms). Review URL: http://codereview.chromium.org/6901147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85200 0039d316-1c4b-4281-b951-d872f2087c98
* MAC Cookies (patch 1 of N)abarth@chromium.org2011-04-301-0/+29
| | | | | | | | | | | | This is the first patch towards implementing https://github.com/hueniverse/draft-hammer-http-mac/raw/master/draft-hammer-oauth-v2-mac-token.txt Parse MAC-Key and MAC-Algorithm from Set-Cookie and store the values in memory. Future patches will use these values to sign requests. Review URL: http://codereview.chromium.org/6883253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83649 0039d316-1c4b-4281-b951-d872f2087c98
* Use lock-free lazy initialization for static histogram referencesjar@chromium.org2011-04-051-1/+1
| | | | | | | | | | | | | | | | Make all histogram macros thread safe, and fast by again using statics to achieve performance. ...at the cost of: Leak all histograms to avoid races at shutdown. Also included leak suppression for valgrind. r=rtenneti BUG=78207 Review URL: http://codereview.chromium.org/6780035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80412 0039d316-1c4b-4281-b951-d872f2087c98
* Remove CookieMonster bug catching stuff.rdsmith@chromium.org2011-03-311-11/+1
| | | | | | | | | BUG=74585 TEST=net_unittests, try bots. Review URL: http://codereview.chromium.org/6783020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80038 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most unnecessary uses of "net::" in net/base/.adamk@chromium.org2011-03-251-122/+122
| | | | | | | | | | Also removes several empty and unused gtest test fixtures. R=willchan@chromium.org Review URL: http://codereview.chromium.org/6676134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79411 0039d316-1c4b-4281-b951-d872f2087c98
* Don't record expiration time of unexpiring cookies.rdsmith@chromium.org2011-03-171-0/+31
| | | | | | | | BUG=76241 Review URL: http://codereview.chromium.org/6685064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78570 0039d316-1c4b-4281-b951-d872f2087c98
* Keep expired and file: cookies when using the cookie monster as dumb data storejochen@chromium.org2011-03-151-0/+28
| | | | | | | | | BUG=none TEST=net_unittests Review URL: http://codereview.chromium.org/6626071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78174 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily disable CookieMonsterTest.GarbageCollectionTriggers, since it is ↵eroman@chromium.org2011-03-111-1/+7
| | | | | | | | | | timing out on tsan bot. See comment inside CL for more details. TBR=rdsmith Review URL: http://codereview.chromium.org/6676024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77798 0039d316-1c4b-4281-b951-d872f2087c98
* Added new checks:rdsmith@chromium.org2011-03-101-4/+4
| | | | | | | | | | | | | + ValidateMap() from DeleteAll() calling location in TabSpecificContentSettings. + Boolean to assert if ValidateMap() is called after destruction. + Hack to figure out if pre-rendering is happening in crashes. BUG=74585 TEST=Try bots, running net_unittests CookieMonsterTest and unit_tests TabSpecificContentSettingsTest. Review URL: http://codereview.chromium.org/6658039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77692 0039d316-1c4b-4281-b951-d872f2087c98
* Add in a checker to help narrow down 74585. eroman@chromium.org2011-03-101-0/+4
| | | | | | | | | | | Original author is rdsmith (http://codereview.chromium.org/6660014/) -- I am just checking this in so gets picked up in time for canary build tommorow. BUG=74585 TEST=Try bots, Cookie monster unit tests that have checker added, tab_specific_contents unit tests. Review URL: http://codereview.chromium.org/6659029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77608 0039d316-1c4b-4281-b951-d872f2087c98
* Show the origin of the site setting the cookie instead of the domain of therogerta@chromium.org2011-02-241-0/+30
| | | | | | | | | | | cookie. BUG=63662 TEST=see repro steps in bug report, including expected result Review URL: http://codereview.chromium.org/6524024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75890 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up net unit testing code.erg@google.com2011-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | (Reapply r72562 with willchan's nits + locally tested shlib fixes + removing duplicate code that was partially responsible for the failure.) - Move code included from blah_unittest.h (where blah_unittest.cc has actual unittests) into their own files, often completely out-of-lining the definitions. - Remove anonymous namespaces from headers. - Reorder method declarations. - Make other unit test link against net_test_support instead of reaching in and including .h files in their targets directly. BUG=68682 TEST=compiles First Review URL: http://codereview.chromium.org/6264013 Review URL: http://codereview.chromium.org/6248021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72682 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Clean up net unit testing code." since it breaks the shlib builder.erg@google.com2011-01-251-1/+0
| | | | | | | | | | This reverts commit 006f377bbb65ece3490b7c76e58e0dc4cb330909 (r72562). BUG=68682 TEST=compiles TBR=thomasvl git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72564 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up net unit testing code.erg@google.com2011-01-251-0/+1
| | | | | | | | | | | | | | | | | - Move code included from blah_unittest.h (where blah_unittest.cc has actual unittests) into their own files, often completely out-of-lining the definitions. - Remove anonymous namespaces from headers. - Reorder method declarations. - Make other unit test link against net_test_support instead of reaching in and including .h files in their targets directly. BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6264013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72562 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/platform_thread.h stub and fix up all callers to use the new ↵brettw@google.com2011-01-011-3/+3
| | | | | | | | | location and namespace. TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70346 0039d316-1c4b-4281-b951-d872f2087c98
* Add Flush(Task*) method to CookieMonster.rdsmith@chromium.org2010-12-231-0/+104
| | | | | | | | | | | | | | Flushes cookies to disk immediately, rather than waiting for the 30-second timer. It takes an optional completion callback. Patch from husky@google.com. BUG=None TEST=CookieMonsterTest, Additional SQLitePersistentCookieStore tests. Review URL: http://codereview.chromium.org/5365010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70067 0039d316-1c4b-4281-b951-d872f2087c98
* Also register read cookies in the content settings delegate.jochen@chromium.org2010-12-071-0/+11
| | | | | | | | | BUG=63663 TEST=unit tests Review URL: http://codereview.chromium.org/5318002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68458 0039d316-1c4b-4281-b951-d872f2087c98
* Make the cookie list a class (instead of a typedef inside CookieMonster)...jochen@chromium.org2010-12-031-21/+18
| | | | | | | | | | | ...so it can be forward declared BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5462002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68173 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure a cookie can be deleted, even when forced to session only.jochen@chromium.org2010-11-161-0/+28
| | | | | | | | | BUG=63258 TEST=net_unittests --gtest_filter=CookieMonsterTest.ForceSessionOnly Review URL: http://codereview.chromium.org/4967004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66281 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 1thakis@chromium.org2010-11-011-7/+7
| | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use last_access_time vs. Now() comparison to mean "all cookies".rdsmith@google.com2010-10-291-2/+1
| | | | | | | | | BUG=60015 TEST=net_unittests CookieMonsterTest.* (flakiness was rare enough that the only real test will be committing and seeing if the problem is fixed). Review URL: http://codereview.chromium.org/4131001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64453 0039d316-1c4b-4281-b951-d872f2087c98
* Mark CookieMonsterTest.GarbageCollectionTriggers as FLAKY.eroman@chromium.org2010-10-201-1/+2
| | | | | | | BUG=60015 Review URL: http://codereview.chromium.org/4016001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63279 0039d316-1c4b-4281-b951-d872f2087c98
* Don't rely on "access_time < Time::Now()" to indicate "all cookies".rdsmith@google.com2010-10-181-8/+1
| | | | | | | | | | | | | | | | 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
* CookieMonsterTest.TestHostGarbageCollection fails net_unittests on Modules XPdhollowa@chromium.org2010-10-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding FLAKY designation to this test. http://build.chromium.org/buildbot/waterfall/builders/Modules%20XP/builds/35620/steps/net_unittests/logs/stdio [ OK ] CookieMonsterTest.TestLastAccess (219 ms) [ RUN ] CookieMonsterTest.TestHostGarbageCollection .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 181 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 183 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 185 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 187 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 189 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 191 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 193 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 195 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 197 vs 180 .\base\cookie_monster_unittest.cc(1080): error: Expected: ((CountInString(cookies_general, '=') + CountInString(cookies_specific, '='))) <= (domain_max_cookies), actual: 199 vs 180 [ FAILED ] CookieMonsterTest.TestHostGarbageCollection (219 ms) [ RUN ] CookieMonsterTest.NetUtilCookieTest BUG=58197 TEST=CookieMonsterTest.MAYBE_TestHostGarbageCollection TBR=rdsmith@chromium.org Review URL: http://codereview.chromium.org/3610014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61699 0039d316-1c4b-4281-b951-d872f2087c98
* clang/mac: Fix almost all problems when building all.xcodeproj.thakis@chromium.org2010-10-041-7/+7
| | | | | | | | BUG=None TEST=None TBR=hans git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61344 0039d316-1c4b-4281-b951-d872f2087c98
* This is the final change for issue 8850, changing the expiry behaviorrdsmith@google.com2010-10-011-123/+129
| | | | | | | | | | | | | | | | | of cookies to match Firefox in keeping around cookies that have been accessed within the last 30 days. More detailed summary of changes: * Key scheme specification expanded to include expiry scheme (old vs. new). * GC code refactored to make stats collection and variations in GC simpler. * New tests written for probing GC. BUG=8850 TEST=All known cookie tests. Several new tests written for this change. Review URL: http://codereview.chromium.org/3323025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61189 0039d316-1c4b-4281-b951-d872f2087c98
* net: Append base:: in the StringPrintf calls.tfarina@chromium.org2010-09-251-5/+6
| | | | | | | | | | | (Note: This is a TODO in string_util.h) BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3390026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60555 0039d316-1c4b-4281-b951-d872f2087c98
* This CL changes our per-domain limits to be per-effective domain.rdsmith@chromium.org2010-09-071-17/+237
| | | | | | | | | | | | | | This matches FireFox behavior and is for denial of service protection when we go to FireFox expiry behavior (keeping cookies around indefinitely if they don't have a max-age and are being used); see issue (8850) for details. BUG=8850 TEST=net_unittests/net_perftests on Linux with CookieMonsterTest.* filter Review URL: http://codereview.chromium.org/3122013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58732 0039d316-1c4b-4281-b951-d872f2087c98
* Change, unify, and specify ordering of cookies from CookieMonster.rdsmith@chromium.org2010-08-271-0/+45
| | | | | | | | | | | | | | Affected interfaces: * GetCookiesWithOptions (used by HTTP requests) * GetAllCookiesForURL (used by extensions and Cookies UI) * GetAllCookies (used by Cookies UI). BUG=8850 (indirectly) TEST=Standard cookie monster tests, unit_tests::CookiesTreeModelTest.OriginOrdering, browser_tests::ExtensionApiTest.Cookies Review URL: http://codereview.chromium.org/3170034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57694 0039d316-1c4b-4281-b951-d872f2087c98
* More cleanup relating to the domain now being part of the CanonicalCookie:rdsmith@chromium.org2010-08-061-64/+40
| | | | | | | | | | | | * Simplify DeleteCookie(CanonicalCookie) API * Get rid of KeyedCanonicalCookie type; not needed. BUG=8850 TEST=Try bots, net_unittest --gtest_filter=CookieMonsterTest.* (refactor, so tests should all keep passing.) Review URL: http://codereview.chromium.org/3095002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55241 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: rdsmithrdsmith@google.com2010-07-281-0/+0
| | | | | | Fixing execute permissions issue. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53975 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes targeting the unique creation times invariant in the CookieMonster:rdsmith@google.com2010-07-281-143/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 Review URL: http://codereview.chromium.org/3070001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53957 0039d316-1c4b-4281-b951-d872f2087c98
* Changed type CookieList to being a vector CanonicalCookies.rdsmith@google.com2010-07-211-70/+65
| | | | | | | | | | | Originally, it was a vector of pair<domain_string, CanonicalCookie>. TEST=Refactor; all relevant unit tests should still pass. BUG=8850 Review URL: http://codereview.chromium.org/2799057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53184 0039d316-1c4b-4281-b951-d872f2087c98