| 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 de1b849c48dff3a161d36ce34603a2ae61ade501..a73258635bd5b802525036cff87ceceec9d540ae 100644
|
| --- a/chrome/browser/net/sqlite_persistent_cookie_store.cc
|
| +++ b/chrome/browser/net/sqlite_persistent_cookie_store.cc
|
| @@ -506,8 +506,7 @@ bool SQLitePersistentCookieStore::Backend::InitializeDatabase() {
|
| sql::Statement smt(db_->GetUniqueStatement(
|
| "SELECT DISTINCT host_key FROM cookies"));
|
|
|
| - if (!smt) {
|
| - NOTREACHED() << "select statement prep failed";
|
| + if (!smt.is_valid()) {
|
| db_.reset();
|
| return false;
|
| }
|
| @@ -589,8 +588,7 @@ bool SQLitePersistentCookieStore::Backend::LoadCookiesForDomains(
|
| "secure, httponly, last_access_utc, has_expires, persistent "
|
| "FROM cookies WHERE host_key = ? AND persistent = 1"));
|
| }
|
| - if (!smt) {
|
| - NOTREACHED() << "select statement prep failed";
|
| + if (!smt.is_valid()) {
|
| db_.reset();
|
| return false;
|
| }
|
| @@ -792,30 +790,23 @@ void SQLitePersistentCookieStore::Backend::Commit() {
|
| "expires_utc, secure, httponly, last_access_utc, has_expires, "
|
| "persistent) "
|
| "VALUES (?,?,?,?,?,?,?,?,?,?,?)"));
|
| - if (!add_smt) {
|
| - NOTREACHED();
|
| + if (!add_smt.is_valid())
|
| return;
|
| - }
|
|
|
| sql::Statement update_access_smt(db_->GetCachedStatement(SQL_FROM_HERE,
|
| "UPDATE cookies SET last_access_utc=? WHERE creation_utc=?"));
|
| - if (!update_access_smt) {
|
| - NOTREACHED();
|
| + if (!update_access_smt.is_valid())
|
| return;
|
| - }
|
|
|
| sql::Statement del_smt(db_->GetCachedStatement(SQL_FROM_HERE,
|
| "DELETE FROM cookies WHERE creation_utc=?"));
|
| - if (!del_smt) {
|
| - NOTREACHED();
|
| + if (!del_smt.is_valid())
|
| return;
|
| - }
|
|
|
| sql::Transaction transaction(db_.get());
|
| - if (!transaction.Begin()) {
|
| - NOTREACHED();
|
| + if (!transaction.Begin())
|
| return;
|
| - }
|
| +
|
| for (PendingOperationsList::iterator it = ops.begin();
|
| it != ops.end(); ++it) {
|
| // Free the cookies as we commit them to the database.
|
|
|