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

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

Issue 150095: Fix: Spurious SQL error message is logged in priming SQLite database cache.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « chrome/browser/history/history_database.h ('k') | chrome/common/net/cookie_monster_sqlite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_database.cc
===================================================================
--- chrome/browser/history/history_database.cc (revision 19238)
+++ chrome/browser/history/history_database.cc (working copy)
@@ -57,8 +57,8 @@
// Make sure the statement cache is properly initialized.
statement_cache_->set_db(db_);
- // Prime the cache. See the header file's documentation for this function.
- PrimeCache();
+ // Prime the cache.
+ MetaTableHelper::PrimeCache(std::string(), db_);
// Create the tables and indices.
// NOTE: If you add something here, also add it to
@@ -88,19 +88,6 @@
sqlite3_exec(db_, "PRAGMA locking_mode=EXCLUSIVE", NULL, NULL, NULL);
}
-void HistoryDatabase::PrimeCache() {
- // A statement must be open for the preload command to work. If the meta
- // table can't be read, it probably means this is a new database and there
- // is nothing to preload (so it's OK we do nothing).
- SQLStatement dummy;
- if (dummy.prepare(db_, "SELECT * from meta") != SQLITE_OK)
- return;
- if (dummy.step() != SQLITE_ROW)
- return;
-
- sqlite3Preload(db_);
-}
-
// static
int HistoryDatabase::GetCurrentVersion() {
return kCurrentVersionNumber;
« no previous file with comments | « chrome/browser/history/history_database.h ('k') | chrome/common/net/cookie_monster_sqlite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698