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

Unified Diff: chrome/browser/webdata/logins_table_win.cc

Issue 8966003: Update webdata files to take advantage of DLOG(FATAL) in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
Index: chrome/browser/webdata/logins_table_win.cc
diff --git a/chrome/browser/webdata/logins_table_win.cc b/chrome/browser/webdata/logins_table_win.cc
index 581c176f55bd10889862ccb4fc264d11cda28fe6..05601ad68a7aca10b818780abac75a1b252ce730 100644
--- a/chrome/browser/webdata/logins_table_win.cc
+++ b/chrome/browser/webdata/logins_table_win.cc
@@ -15,37 +15,21 @@ bool LoginsTable::AddIE7Login(const IE7PasswordInfo& info) {
"INSERT OR REPLACE INTO ie7_logins "
"(url_hash, password_value, date_created) "
"VALUES (?,?,?)"));
- if (!s) {
- NOTREACHED() << db_->GetErrorMessage();
- return false;
- }
-
s.BindString(0, WideToUTF8(info.url_hash));
s.BindBlob(1, &info.encrypted_data.front(),
static_cast<int>(info.encrypted_data.size()));
s.BindInt64(2, info.date_created.ToTimeT());
- if (!s.Run()) {
- NOTREACHED();
- return false;
- }
- return true;
+
+ return s.Run();
}
bool LoginsTable::RemoveIE7Login(const IE7PasswordInfo& info) {
// Remove a login by UNIQUE-constrained fields.
sql::Statement s(db_->GetUniqueStatement(
"DELETE FROM ie7_logins WHERE url_hash = ?"));
- if (!s) {
- NOTREACHED() << db_->GetErrorMessage();
- return false;
- }
s.BindString(0, WideToUTF8(info.url_hash));
- if (!s.Run()) {
- NOTREACHED();
- return false;
- }
- return true;
+ return s.Run();
}
bool LoginsTable::GetIE7Login(const IE7PasswordInfo& info,
@@ -54,12 +38,8 @@ bool LoginsTable::GetIE7Login(const IE7PasswordInfo& info,
sql::Statement s(db_->GetUniqueStatement(
"SELECT password_value, date_created FROM ie7_logins "
"WHERE url_hash == ? "));
- if (!s) {
- NOTREACHED() << db_->GetErrorMessage();
- return false;
- }
-
s.BindString(0, WideToUTF8(info.url_hash));
Scott Hess - ex-Googler 2011/12/15 23:02:57 I'd rather this were just BindString16(), as long
Greg Billock 2011/12/16 17:26:58 Done.
+
if (s.Step()) {
s.ColumnBlobAsVector(0, &result->encrypted_data);
result->date_created = base::Time::FromTimeT(s.ColumnInt64(1));

Powered by Google App Engine
This is Rietveld 408576698