diff options
author | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 18:40:24 +0000 |
---|---|---|
committer | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 18:40:24 +0000 |
commit | 8475bee07282ddc630a4d3e88c409c969164af3b (patch) | |
tree | 95eafae678e25c397a7fb40c59b913e38f21f3f4 /net/base/cookie_monster.cc | |
parent | bee76312478612f6b7e006799e287b1abf2a8a3c (diff) | |
download | chromium_src-8475bee07282ddc630a4d3e88c409c969164af3b.zip chromium_src-8475bee07282ddc630a4d3e88c409c969164af3b.tar.gz chromium_src-8475bee07282ddc630a4d3e88c409c969164af3b.tar.bz2 |
Don't record expiration time of unexpiring cookies.
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
Diffstat (limited to 'net/base/cookie_monster.cc')
-rw-r--r-- | net/base/cookie_monster.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc index 9de1296c..928019e 100644 --- a/net/base/cookie_monster.cc +++ b/net/base/cookie_monster.cc @@ -1316,8 +1316,11 @@ bool CookieMonster::SetCanonicalCookie(scoped_ptr<CanonicalCookie>* cc, // was to delete the cookie which we've already done. if (!(*cc)->IsExpired(creation_time) || keep_expired_cookies_) { // See InitializeHistograms() for details. - histogram_expiration_duration_minutes_->Add( - ((*cc)->ExpiryDate() - creation_time).InMinutes()); + if ((*cc)->DoesExpire()) { + histogram_expiration_duration_minutes_->Add( + ((*cc)->ExpiryDate() - creation_time).InMinutes()); + } + InternalInsertCookie(key, cc->release(), true); } |