| Index: net/cookies/cookie_monster.cc
|
| diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
|
| index e9eccd2c907f94a20025d4a5dc6925105db46d2c..0e78185e815d62fc9677918015612e0935f4d6ea 100644
|
| --- a/net/cookies/cookie_monster.cc
|
| +++ b/net/cookies/cookie_monster.cc
|
| @@ -853,6 +853,7 @@ void CookieMonster::SetCookieWithDetailsAsync(
|
|
|
| void CookieMonster::FlushStore(const base::Closure& callback) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| +
|
| if (initialized_ && store_.get())
|
| store_->Flush(callback);
|
| else if (!callback.is_null())
|
| @@ -861,6 +862,7 @@ void CookieMonster::FlushStore(const base::Closure& callback) {
|
|
|
| void CookieMonster::SetForceKeepSessionState() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| +
|
| if (store_)
|
| store_->SetForceKeepSessionState();
|
| }
|
| @@ -992,6 +994,7 @@ CookieMonster::AddCallbackForCookie(const GURL& gurl,
|
| const std::string& name,
|
| const CookieChangedCallback& callback) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| +
|
| std::pair<GURL, std::string> key(gurl, name);
|
| if (hook_map_.count(key) == 0)
|
| hook_map_[key] = make_linked_ptr(new CookieChangedCallbackList());
|
| @@ -1002,6 +1005,8 @@ CookieMonster::AddCallbackForCookie(const GURL& gurl,
|
| CookieMonster::~CookieMonster() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| + // TODO(mmenke): Does it really make sense to run |delegate_| and
|
| + // CookieChanged callbacks when the CookieStore is destroyed?
|
| for (CookieMap::iterator cookie_it = cookies_.begin();
|
| cookie_it != cookies_.end();) {
|
| CookieMap::iterator current_cookie_it = cookie_it;
|
|
|