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

Unified Diff: chrome/browser/safe_browsing/filter_false_positive_perftest.cc

Issue 9365030: More SQL statement usage regularization. Back-touch some (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix log messages Created 8 years, 10 months 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/safe_browsing/filter_false_positive_perftest.cc
diff --git a/chrome/browser/safe_browsing/filter_false_positive_perftest.cc b/chrome/browser/safe_browsing/filter_false_positive_perftest.cc
index 22412cb2b78ea189ba11d442e8ebacd773f12c7c..0347e2576d1ff5d0c438a5c196a941372bdd1d24 100644
--- a/chrome/browser/safe_browsing/filter_false_positive_perftest.cc
+++ b/chrome/browser/safe_browsing/filter_false_positive_perftest.cc
@@ -133,9 +133,6 @@ bool ReadDatabase(const FilePath& path, std::vector<SBPrefix>* prefixes) {
// Get the number of items in the add_prefix table.
const char* query = "SELECT COUNT(*) FROM add_prefix";
sql::Statement count_statement(db.GetCachedStatement(SQL_FROM_HERE, query));
Scott Hess - ex-Googler 2012/02/13 22:04:04 Lovely. LGTM, but feel free to drop this particul
Greg Billock 2012/02/13 22:48:59 If it's dead, I'll leave it to eliminate pressure
Scott Hess - ex-Googler 2012/02/13 22:52:58 OK.
- if (!count_statement)
- return false;
-
if (!count_statement.Step())
return false;
@@ -145,7 +142,7 @@ bool ReadDatabase(const FilePath& path, std::vector<SBPrefix>* prefixes) {
prefixes->reserve(count);
query = "SELECT prefix FROM add_prefix";
sql::Statement prefix_statement(db.GetCachedStatement(SQL_FROM_HERE, query));
- if (!prefix_statement)
+ if (!prefix_statement.is_valid())
return false;
while (prefix_statement.Step())

Powered by Google App Engine
This is Rietveld 408576698