| Index: chrome/browser/net/sqlite_persistent_cookie_store.cc
|
| diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.cc b/chrome/browser/net/sqlite_persistent_cookie_store.cc
|
| index 875b37f412ede00812dd3c904c52e06d547f7649..50ca24f337589fb8ecb9995d96852454593c0987 100644
|
| --- a/chrome/browser/net/sqlite_persistent_cookie_store.cc
|
| +++ b/chrome/browser/net/sqlite_persistent_cookie_store.cc
|
| @@ -294,11 +294,13 @@ bool InitTable(sql::Connection* db) {
|
| }
|
|
|
| // Try to create the index every time. Older versions did not have this index,
|
| - // so we want those people to get it. Ignore errors, since it may exist.
|
| - db->Execute("CREATE INDEX IF NOT EXISTS cookie_times ON cookies"
|
| - " (creation_utc)");
|
| + // so we want those people to get it.
|
| + if (!db->Execute("CREATE INDEX IF NOT EXISTS cookie_times ON cookies"
|
| + " (creation_utc)"))
|
| + return false;
|
|
|
| - db->Execute("CREATE INDEX IF NOT EXISTS domain ON cookies(host_key)");
|
| + if (!db->Execute("CREATE INDEX IF NOT EXISTS domain ON cookies(host_key)"))
|
| + return false;
|
|
|
| return true;
|
| }
|
| @@ -671,24 +673,24 @@ bool SQLitePersistentCookieStore::Backend::EnsureDatabaseVersion() {
|
| sql::Transaction transaction(db_.get());
|
| transaction.Begin();
|
| #if !defined(OS_WIN)
|
| - db_->Execute(
|
| + ignore_result(db_->Execute(
|
| "UPDATE cookies "
|
| "SET creation_utc = creation_utc + 11644473600000000 "
|
| "WHERE rowid IN "
|
| "(SELECT rowid FROM cookies WHERE "
|
| - "creation_utc > 0 AND creation_utc < 11644473600000000)");
|
| - db_->Execute(
|
| + "creation_utc > 0 AND creation_utc < 11644473600000000)"));
|
| + ignore_result(db_->Execute(
|
| "UPDATE cookies "
|
| "SET expires_utc = expires_utc + 11644473600000000 "
|
| "WHERE rowid IN "
|
| "(SELECT rowid FROM cookies WHERE "
|
| - "expires_utc > 0 AND expires_utc < 11644473600000000)");
|
| - db_->Execute(
|
| + "expires_utc > 0 AND expires_utc < 11644473600000000)"));
|
| + ignore_result(db_->Execute(
|
| "UPDATE cookies "
|
| "SET last_access_utc = last_access_utc + 11644473600000000 "
|
| "WHERE rowid IN "
|
| "(SELECT rowid FROM cookies WHERE "
|
| - "last_access_utc > 0 AND last_access_utc < 11644473600000000)");
|
| + "last_access_utc > 0 AND last_access_utc < 11644473600000000)"));
|
| #endif
|
| ++cur_version;
|
| meta_table_.SetVersionNumber(cur_version);
|
|
|