diff options
-rw-r--r-- | chrome/common/net/cookie_monster_sqlite.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/common/net/cookie_monster_sqlite.cc b/chrome/common/net/cookie_monster_sqlite.cc index f4026d0..8b9c430 100644 --- a/chrome/common/net/cookie_monster_sqlite.cc +++ b/chrome/common/net/cookie_monster_sqlite.cc @@ -149,7 +149,9 @@ void SQLitePersistentCookieStore::Backend::Commit() { return; SQLITE_UNIQUE_STATEMENT(add_smt, *cache_, - "INSERT INTO cookies VALUES (?,?,?,?,?,?,?,?)"); + "INSERT INTO cookies (creation_utc, host_key, name, value, path, " + "expires_utc, secure, httponly) " + "VALUES (?,?,?,?,?,?,?,?)"); if (!add_smt.is_valid()) { NOTREACHED(); return; @@ -182,6 +184,7 @@ void SQLitePersistentCookieStore::Backend::Commit() { NOTREACHED() << "Could not add a cookie to the DB."; } break; + case PendingOperation::COOKIE_DELETE: del_smt->reset(); del_smt->bind_int64(0, po->cc().CreationDate().ToInternalValue()); @@ -189,6 +192,7 @@ void SQLitePersistentCookieStore::Backend::Commit() { NOTREACHED() << "Could not delete a cookie from the DB."; } break; + default: NOTREACHED(); break; @@ -284,7 +288,9 @@ bool SQLitePersistentCookieStore::Load( // Slurp all the cookies into the out-vector. SQLStatement smt; - if (smt.prepare(db, "SELECT * FROM cookies") != SQLITE_OK) { + if (smt.prepare(db, + "SELECT creation_utc, host_key, name, value, path, expires_utc, secure, " + "httponly FROM cookies") != SQLITE_OK) { NOTREACHED() << "select statement prep failed"; sqlite3_close(db); return false; |