Chromium Code Reviews| 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 eaf793047a9b0b8cf28803ef9d84c69d418d74dd..3995fb878eb4305d48c6a05579d19c448b519742 100644 |
| --- a/content/browser/net/sqlite_persistent_cookie_store.cc |
| +++ b/content/browser/net/sqlite_persistent_cookie_store.cc |
| @@ -431,8 +431,6 @@ bool InitTable(sql::Connection* db) { |
| void SQLitePersistentCookieStore::Backend::Load( |
| const LoadedCallback& loaded_callback) { |
| - // This function should be called only once per instance. |
|
erikwright (departed)
2015/04/13 13:47:11
Why did this change?
erikchen
2015/04/27 22:00:13
I removed this change.
|
| - DCHECK(!db_.get()); |
| PostBackgroundTask(FROM_HERE, base::Bind( |
| &Backend::LoadAndNotifyInBackground, this, |
| loaded_callback, base::Time::Now())); |
| @@ -682,6 +680,10 @@ bool SQLitePersistentCookieStore::Backend::InitializeDatabase() { |
| 50); |
| initialized_ = true; |
| + |
| + if (!restore_old_session_cookies_) |
| + DeleteSessionCookiesOnStartup(); |
| + |
| return true; |
| } |
| @@ -1268,8 +1270,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( |