Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: content/browser/net/sqlite_persistent_cookie_store.cc

Issue 1052373003: Add Finch experiment to cookie monster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from erikwright. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/cookies/cookie_monster.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | net/cookies/cookie_monster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698