summaryrefslogtreecommitdiffstats
path: root/net/cookies
Commit message (Collapse)AuthorAgeFilesLines
* Small fixes to allow unit tests to compile with gcc 4.7.x (tested with gcc ↵kamil.jiwa@gmail.com2013-01-032-10/+8
| | | | | | | | 4.7.2) Review URL: https://chromiumcodereview.appspot.com/11568033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174956 0039d316-1c4b-4281-b951-d872f2087c98
* Add IncludeForRequestURL method to CanonicalCookie.markusheintz@chromium.org2012-12-124-18/+82
| | | | | | | | | | | | Move the code for checking whether to include a cookie or not from the CookieMonster to the new method in CanonicalCookie. This means the new method IncludeForRequestURL returns true when the cookie should be included for the given |url| and cookie options. Change the CookieMonster to use the IncludeForRequestURL method of CanonicalCookie to test whether a cookie should be included or not. TEST=CanonicalCookieTest.IncludeForRequestURL (net_unittests) BUG=none Review URL: https://chromiumcodereview.appspot.com/11308272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172668 0039d316-1c4b-4281-b951-d872f2087c98
* Add tests that test creating secure and http-only cookies using ↵markusheintz@chromium.org2012-12-101-0/+21
| | | | | | | | | | | CanonicalCookie::Create. TEST=CanonicalCookieTest.Create (net_unittests) BUG=161767 Review URL: https://chromiumcodereview.appspot.com/11452003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172164 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused parameter from the method IsDomainMatch of the class ↵markusheintz@chromium.org2012-11-304-22/+19
| | | | | | | | | | | CanonicalCookie. TEST=CanonicalCookie* BUG=163349 Review URL: https://chromiumcodereview.appspot.com/11308270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170442 0039d316-1c4b-4281-b951-d872f2087c98
* Add unittests to test the "IsOnPath" and "IsDomainMatch methods of the class ↵markusheintz@chromium.org2012-11-291-0/+57
| | | | | | | | | | | CannonicalCookie. BUG=161767 Review URL: https://chromiumcodereview.appspot.com/11414203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170215 0039d316-1c4b-4281-b951-d872f2087c98
* Add unit tests for the method IsEquivalent of the class CanonicalCookie.markusheintz@chromium.org2012-11-221-0/+83
| | | | | | | | BUG=161767 Review URL: https://chromiumcodereview.appspot.com/11414059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169276 0039d316-1c4b-4281-b951-d872f2087c98
* net/cookies: Do not introduce a static initializer in perftest.tfarina@chromium.org2012-11-221-40/+38
| | | | | | | | | | | | | GURL is not a POD and thus should not be constructed at file scope. See the whole discussion about this in: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/50fGokbPfJ0 R=erikwright@chromium.org,rsleevi@chromium.org Review URL: https://chromiumcodereview.appspot.com/11348154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169173 0039d316-1c4b-4281-b951-d872f2087c98
* The "Create" method for creating a CanonicalCookie from a ParsedCookie uses ↵markusheintz@chromium.org2012-11-155-57/+122
| | | | | | | | | | | | | | | | the wrong default value for cookie-domain and for cookie-path. Apply the correct default values. 1) By default a cookie with no explicit cookie-domain attribute should be a "host-only" cookie. 2) By default the path of the request URL should be used for cookies with no explicit cookie-path attribute. Move logic for validating cookie attributes from the CookieMonster to the CanonicalCookie. This way code outside the CookieMonster (e.g. BrowsingDataCookieHelper) can use the same code path. TEST=CanonicalCookieTest.Create BUG=160993 Review URL: https://chromiumcodereview.appspot.com/11341045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167950 0039d316-1c4b-4281-b951-d872f2087c98
* net: Update calls from RunAllPending() to RunUntilIdle().tfarina@chromium.org2012-11-142-9/+9
| | | | | | | | | | | | RunAllPending() is deprecated and we should switch to RunUntilIdle(). BUG=131220 TBR=willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/11361263 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167705 0039d316-1c4b-4281-b951-d872f2087c98
* Account for server vs host clock skew in cookie expiration times.pauljensen@chromium.org2012-11-015-7/+55
| | | | | | | | | | | | | When setting a cookie's expiration time in the cookie store we need to take into account any difference between the HTTP server and the host machine's real time clock. This reverts 159685 which reverted 146616. BUG=135131 TEST=net_unittests --gtest_filter=CookieMonster/CookieStoreTest/0.TestCookieDeletion Review URL: https://chromiumcodereview.appspot.com/11339032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165323 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 146616.erikwright@chromium.org2012-10-025-55/+7
| | | | | | | | | | | | | | | | | | | | Account for server vs host clock skew in cookie expiration times. When setting a cookie's expiration time in the cookie store we need to take into account any difference between the HTTP server and the host machine's real time clock. BUG=135131 TEST=net_unittests --gtest_filter=CookieMonster/CookieStoreTest/0.TestCookieDeletion Review URL: https://chromiumcodereview.appspot.com/10692137 R=pauljensen@chromium.org,szym@chromium.org BUG=152078 Review URL: https://chromiumcodereview.appspot.com/11036007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159685 0039d316-1c4b-4281-b951-d872f2087c98
* SampleSet -> HistogramSamples which can be reused by SparseHistogramkaiwang@chromium.org2012-09-221-9/+10
| | | | | | | | BUG=139612 Review URL: https://chromiumcodereview.appspot.com/10829466 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158166 0039d316-1c4b-4281-b951-d872f2087c98
* Sort includes in cookie_monster.h.pliard@chromium.org2012-08-141-1/+1
| | | | | | | | | | | | | This is part of Chrome for Android upstreaming. This was causing an unnecessary diff with downstream. BUG=136750 Review URL: https://chromiumcodereview.appspot.com/10828302 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151474 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ENABLE_PERSISTENT_SESSION_COOKIESjgreenwald@chromium.org2012-08-024-78/+0
| | | | | | | | | | | | This isn't needed anymore now that CookieMonster::SetPersistSessionCookies exists. BUG=115372 Review URL: https://chromiumcodereview.appspot.com/10831117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149708 0039d316-1c4b-4281-b951-d872f2087c98
* Add a mutable version of CookieMonster::ParsedCookiebattre@chromium.org2012-08-023-59/+399
| | | | | | | | | | | | This CL implements CookieMonster::MutableParsedCookie which is derived from CookieMonster::ParsedCookie. This allows parsing a cookie and modifying it afterwards. BUG=112155 TEST=no Review URL: https://chromiumcodereview.appspot.com/10697035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149622 0039d316-1c4b-4281-b951-d872f2087c98
* Do not inherit from std::vector.tfarina@chromium.org2012-07-252-5/+2
| | | | | | | | | | | | | vector does not have a virtual destructor, see Item 7 from of Effective STL from Scott Meyers for a detailed explanation. BUG=135335 R=markusheintz@chromium.org,willchan@chromium.org TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10796081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148315 0039d316-1c4b-4281-b951-d872f2087c98
* Move files related to registry-controlled domains into a new ↵pam@chromium.org2012-07-202-2/+2
| | | | | | | | | | | | net/base/registry_controlled_domains/ subdirectory. This includes net/base/registry_controlled_domain.* and net/base/effective_tld_names* BUG=138047 TEST=covered by existing tests Review URL: https://chromiumcodereview.appspot.com/10796033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147641 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed namespace commentsbattre@chromium.org2012-07-192-2/+2
| | | | | | | | | | BUG=137014 TEST=no TBR=eroman@chromium.org,erikwright@chromium.org Review URL: https://chromiumcodereview.appspot.com/10790070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147411 0039d316-1c4b-4281-b951-d872f2087c98
* Move CanonicalCookie into separate filesbattre@chromium.org2012-07-1812-774/+877
| | | | | | | | | | BUG=137014,112155 TEST=no TBR=sky@chromium.org, erg@chromium.org, tony@chromium.org, eroman@chromium.org Review URL: https://chromiumcodereview.appspot.com/10785017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147222 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 6 failures in net unittests on Androidyongsheng.zhu@intel.com2012-07-181-1/+44
| | | | | | | | | | | | | | These 6 failures are due to enable persistent session cookies: 1) Cookie without expiry time is persistent; 2) Cookie without expiry time is persistent so that the add/delete command will be pushed back into the command list of cookie store. BUG= TEST=net_unittests; run_tests.py -s net_unittests Review URL: https://chromiumcodereview.appspot.com/10704242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147159 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the failed case ThreadCheckDeleteSessionCookies on Androidyongsheng.zhu@intel.com2012-07-171-0/+11
| | | | | | | | | | | | | | | It belongs to net unit tests. On mobile platforms, like Android, persistent session cookies are enabled. So a cookie without expiry time is not expected to be deleted. It depends on the fix for issue #10701167 which enables the macro 'ENABLE_PERSISTENT_SESSION_COOKIES'. BUG= TEST=net_unittests; run_tests.py -s net_unittests Review URL: https://chromiumcodereview.appspot.com/10690188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146963 0039d316-1c4b-4281-b951-d872f2087c98
* Account for server vs host clock skew in cookie expiration times.pauljensen@chromium.org2012-07-133-6/+54
| | | | | | | | | | | | | | | When setting a cookie's expiration time in the cookie store we need to take into account any difference between the HTTP server and the host machine's real time clock. BUG=135131 TEST=net_unittests --gtest_filter=CookieMonster/CookieStoreTest/0.TestCookieDeletion Review URL: https://chromiumcodereview.appspot.com/10692137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146616 0039d316-1c4b-4281-b951-d872f2087c98
* Extract ParsedCookie into a top level classbattre@chromium.org2012-07-128-656/+724
| | | | | | | | | | BUG=137014,112155 TEST=no TBR=sky@chromium.org, rdsmith@chromium.org, jochen@chromium.org Review URL: https://chromiumcodereview.appspot.com/10689158 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146324 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-118-8/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the force_session cookie option, as it's not used anymorejochen@chromium.org2012-07-115-112/+22
| | | | | | | | | | | | BUG=133903 TEST=none TBR=sky@chromium.org,wtc@chromium.org Review URL: https://chromiumcodereview.appspot.com/10694093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146121 0039d316-1c4b-4281-b951-d872f2087c98
* Add CookieMonster::SetEnableFileScheme and CookieMonster::IsCookieableSchemejgreenwald@chromium.org2012-06-122-7/+31
| | | | | | | | | | | | These two methods are used by Chrome on Android. BUG=115372 TEST= Review URL: https://chromiumcodereview.appspot.com/10382209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141591 0039d316-1c4b-4281-b951-d872f2087c98
* Unwire the clear on exit preference from the storage systems.jochen@chromium.org2012-06-055-26/+12
| | | | | | | | | | | | | The "session only" rules should cover the functionality now UI changes and migration code will follow BUG=129349 TEST=added unit tests for the chrome/browser/net/sqlite* classes Review URL: https://chromiumcodereview.appspot.com/10447117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140502 0039d316-1c4b-4281-b951-d872f2087c98
* Moved the ThreadCheckDeleteSessionCookies from cookie_monster_unittest to ↵droger@google.com2012-05-042-37/+40
| | | | | | | | | | | | | | | | cookie_store_unittest This test was incorrectly in cookie_monster_unittest: the DeleteSessionCookiesAsync() method is in CookieStore and should be tested in the base test rather than the derived test. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/10315005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135320 0039d316-1c4b-4281-b951-d872f2087c98
* Disable CookieMonsterTest.GarbageCollectionTriggers on Windows.cbentzel@chromium.org2012-05-031-1/+9
| | | | | | | | | BUG=126095 Review URL: http://codereview.chromium.org/10349010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135162 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructors, net/rsleevi@chromium.org2012-04-285-35/+108
| | | | | | | | | | BUG=123295 TEST=none Review URL: http://codereview.chromium.org/10066045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134460 0039d316-1c4b-4281-b951-d872f2087c98
* Add CookieStore::DeleteSessionCookiesAsync method.husky@chromium.org2012-04-256-0/+123
| | | | | | | | | | | | | | | This is needed by the Android port of Chromium, which has a different startup and shutdown control flow from other platforms. We also need to support the Android framework's android.webkit package, which has a public CookieManager.removeSessionCookie() API. BUG=None TEST=CookieMonsterTest Review URL: http://codereview.chromium.org/9959011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133912 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some grammar in comments, error messages and documentation.gavinp@chromium.org2012-04-032-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to all my reviewers, you are legion. I hope I didn't waste too much of your time. BUG=None Review URL: http://codereview.chromium.org/9854039 Review URL: http://codereview.chromium.org/9854043 Review URL: http://codereview.chromium.org/9863058 Review URL: http://codereview.chromium.org/9863059 Review URL: http://codereview.chromium.org/9887005 Review URL: http://codereview.chromium.org/9890002 Review URL: http://codereview.chromium.org/9891002 Review URL: http://codereview.chromium.org/9895003 Review URL: http://codereview.chromium.org/9896002 Review URL: http://codereview.chromium.org/9896003 Review URL: http://codereview.chromium.org/9897002 Review URL: http://codereview.chromium.org/9897003 Review URL: http://codereview.chromium.org/9903004 Review URL: http://codereview.chromium.org/9904003 Review URL: http://codereview.chromium.org/9904002 Review URL: http://codereview.chromium.org/9904004 Review URL: http://codereview.chromium.org/9906002 Review URL: http://codereview.chromium.org/9906001 Review URL: http://codereview.chromium.org/9906003 Review URL: http://codereview.chromium.org/9909001 Review URL: http://codereview.chromium.org/9909002 Review URL: http://codereview.chromium.org/9909003 Review URL: http://codereview.chromium.org/9909004 Review URL: http://codereview.chromium.org/9910001 Review URL: http://codereview.chromium.org/9910002 Review URL: http://codereview.chromium.org/9910010 Review URL: http://codereview.chromium.org/9911001 Review URL: http://codereview.chromium.org/9912001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130359 0039d316-1c4b-4281-b951-d872f2087c98
* Move the cookie store implementation into its own directory.erikwright@chromium.org2012-03-1518-0/+9097
In the initial step, forwarding headers are left in net/base/cookie_*h . After all clients are updated these will be removed and erikwright will be removed from net/base/OWNERS BUG=70818 TEST=compilation Review URL: http://codereview.chromium.org/9703011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126871 0039d316-1c4b-4281-b951-d872f2087c98