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

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: Fix typo 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..8a751feb66f3db4e6d6a1a8cb5c6a05da23a404d 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.BindString16(0, info.url_hash);
- s.BindString(0, WideToUTF8(info.url_hash));
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