diff options
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); } |