| Index: content/browser/net/sqlite_persistent_cookie_store.cc
|
| diff --git a/content/browser/net/sqlite_persistent_cookie_store.cc b/content/browser/net/sqlite_persistent_cookie_store.cc
|
| index 5da609bb67f72da1a964f60e0c6f67c8d5b41b74..8713294e92a4de021a1432b8f2546d3cf8248981 100644
|
| --- a/content/browser/net/sqlite_persistent_cookie_store.cc
|
| +++ b/content/browser/net/sqlite_persistent_cookie_store.cc
|
| @@ -701,6 +701,9 @@ bool SQLitePersistentCookieStore::Backend::InitializeDatabase() {
|
| 50);
|
|
|
| initialized_ = true;
|
| +
|
| + if (!restore_old_session_cookies_)
|
| + DeleteSessionCookiesOnStartup();
|
| return true;
|
| }
|
|
|
| @@ -1296,7 +1299,7 @@ void SQLitePersistentCookieStore::Backend::SetForceKeepSessionState() {
|
|
|
| void SQLitePersistentCookieStore::Backend::DeleteSessionCookiesOnStartup() {
|
| DCHECK(background_task_runner_->RunsTasksOnCurrentThread());
|
| - if (!db_->Execute("DELETE FROM cookies WHERE persistent == 0"))
|
| + if (!db_->Execute("DELETE FROM cookies WHERE persistent != 1"))
|
| LOG(WARNING) << "Unable to delete session cookies.";
|
| }
|
|
|
| @@ -1321,8 +1324,6 @@ void SQLitePersistentCookieStore::Backend::FinishedLoadingCookies(
|
| bool success) {
|
| PostClientTask(FROM_HERE, base::Bind(&Backend::CompleteLoadInForeground, this,
|
| loaded_callback, success));
|
| - if (success && !restore_old_session_cookies_)
|
| - DeleteSessionCookiesOnStartup();
|
| }
|
|
|
| SQLitePersistentCookieStore::SQLitePersistentCookieStore(
|
|
|