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

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

Issue 222024: Coverity: Initialize statement_cache_ in the constructor.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/archived_database.cc
===================================================================
--- chrome/browser/history/archived_database.cc (revision 27013)
+++ chrome/browser/history/archived_database.cc (working copy)
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <algorithm>
+#include <string>
+
#include "base/string_util.h"
#include "chrome/browser/history/archived_database.h"
#include "chrome/common/sqlite_utils.h"
@@ -17,6 +20,7 @@
ArchivedDatabase::ArchivedDatabase()
: db_(NULL),
+ statement_cache_(NULL),
transaction_nesting_(0) {
}
@@ -80,7 +84,7 @@
void ArchivedDatabase::CommitTransaction() {
DCHECK(db_);
- DCHECK(transaction_nesting_ > 0) << "Committing too many transactions";
+ DCHECK_GT(transaction_nesting_, 0) << "Committing too many transactions";
transaction_nesting_--;
if (transaction_nesting_ == 0) {
int rv = sqlite3_exec(db_, "COMMIT", NULL, NULL, NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698