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

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: Created 5 years, 9 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..40a763368897b0bd6bf1e0c4c9c20efaff53c75c 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.
- DCHECK(!db_.get());
PostBackgroundTask(FROM_HERE, base::Bind(
&Backend::LoadAndNotifyInBackground, this,
loaded_callback, base::Time::Now()));
@@ -469,6 +467,8 @@ void SQLitePersistentCookieStore::Backend::LoadAndNotifyInBackground(
PostClientTask(FROM_HERE, base::Bind(
&Backend::CompleteLoadInForeground, this, loaded_callback, false));
} else {
+ if (!restore_old_session_cookies_)
+ DeleteSessionCookiesOnStartup();
erikwright (departed) 2015/04/07 22:37:09 Isn't this ineffective here? I would think it shou
ChainLoadCookies(loaded_callback);
}
}
@@ -488,6 +488,8 @@ void SQLitePersistentCookieStore::Backend::LoadKeyAndNotifyInBackground(
bool success = false;
if (InitializeDatabase()) {
+ if (!restore_old_session_cookies_)
+ DeleteSessionCookiesOnStartup();
erikwright (departed) 2015/04/07 22:37:09 This makes me think that, in fact, we have a bug a
erikchen 2015/04/08 17:44:26 I agree that the previous behavior was incorrect.
std::map<std::string, std::set<std::string> >::iterator
it = keys_to_load_.find(key);
if (it != keys_to_load_.end()) {
@@ -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