diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 18:12:07 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 18:12:07 +0000 |
commit | 86d9b0dbf3d0351c0b382132e5a8879dbf9426cb (patch) | |
tree | 218d36532641f2d5e0ac78feb616f76018a21406 /net | |
parent | 4f2abecdad4ff2ac012926f33058cf2dbf2e4c88 (diff) | |
download | chromium_src-86d9b0dbf3d0351c0b382132e5a8879dbf9426cb.zip chromium_src-86d9b0dbf3d0351c0b382132e5a8879dbf9426cb.tar.gz chromium_src-86d9b0dbf3d0351c0b382132e5a8879dbf9426cb.tar.bz2 |
DevTools: follow up fix for raw cookies access. Restore auto-locking and do GC upon raw cookies request.
TBR=yurys
Review URL: http://codereview.chromium.org/564039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/cookie_monster.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc index 64b0a7e..992191c 100644 --- a/net/base/cookie_monster.cc +++ b/net/base/cookie_monster.cc @@ -835,6 +835,14 @@ CookieMonster::CookieList CookieMonster::GetAllCookies() { } CookieMonster::CookieList CookieMonster::GetRawCookies(const GURL& url) { + AutoLock autolock(lock_); + InitIfNecessary(); + + // Do not return removed cookies. + GarbageCollectExpired(Time::Now(), + CookieMapItPair(cookies_.begin(), cookies_.end()), + NULL); + CookieList cookie_list; if (!HasCookieableScheme(url)) return cookie_list; |