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

Unified Diff: chrome/browser/history/shortcuts_database.cc

Issue 9005036: [sql] WARN_UNUSED_RESULT on Execute(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error in quota_database_unittest.cc. 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
« no previous file with comments | « chrome/browser/history/in_memory_database.cc ('k') | chrome/browser/history/text_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/shortcuts_database.cc
diff --git a/chrome/browser/history/shortcuts_database.cc b/chrome/browser/history/shortcuts_database.cc
index 45e11a95c148bf0660f613f384e7026413e2d7a0..5b761df0e0f3c39e360ef68cb1b1b1193fd492fa 100644
--- a/chrome/browser/history/shortcuts_database.cc
+++ b/chrome/browser/history/shortcuts_database.cc
@@ -168,17 +168,10 @@ bool ShortcutsDatabase::DeleteShortcutsWithUrl(
}
bool ShortcutsDatabase::DeleteAllShortcuts() {
- sql::Statement s(db_.GetCachedStatement(SQL_FROM_HERE,
- "DROP TABLE " kShortcutsDBName));
- if (!s) {
- NOTREACHED() << "Statement prepare failed";
+ if (!db_.Execute("DELETE FROM " kShortcutsDBName))
return false;
- }
- if (!s.Run())
- return false;
- EnsureTable();
- db_.Execute("VACUUM");
+ ignore_result(db_.Execute("VACUUM"));
return true;
}
« no previous file with comments | « chrome/browser/history/in_memory_database.cc ('k') | chrome/browser/history/text_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698