Chromium Code Reviews| Index: net/base/cookie_monster.cc |
| diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc |
| index 2f0d4b44c259c173404d9f0e8cec31d5b92a44c4..4b5d8e039b1ddc7174b566975cbbe1edfa938b28 100644 |
| --- a/net/base/cookie_monster.cc |
| +++ b/net/base/cookie_monster.cc |
| @@ -389,8 +389,12 @@ bool CookieMonster::SetCookie(const GURL& url, |
| bool CookieMonster::SetCookieWithOptions(const GURL& url, |
| const std::string& cookie_line, |
| const CookieOptions& options) { |
| - Time creation_date = CurrentTime(); |
| - last_time_seen_ = creation_date; |
| + Time creation_date; |
| + { |
| + AutoLock autolock(lock_); |
| + creation_date = CurrentTime(); |
|
darin (slow to review)
2009/03/24 19:58:24
hmm... why call CurrentTime() from within the lock
|
| + last_time_seen_ = creation_date; |
| + } |
| return SetCookieWithCreationTimeWithOptions(url, |
| cookie_line, |
| creation_date, |