diff options
author | Kristian Monsen <kristianm@google.com> | 2011-05-31 20:30:28 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-06-14 20:31:41 -0700 |
commit | 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801 (patch) | |
tree | 382278a54ce7a744d62fa510a9a80688cc12434b /app | |
parent | c4becdd46e31d261b930e4b5a539cbc1d45c23a6 (diff) | |
download | external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.zip external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.gz external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.bz2 |
Merge Chromium.org at r11.0.672.0: Initial merge by git.
Change-Id: I8b4aaf611a2a405fe3fe10e8a94ea7658645c192
Diffstat (limited to 'app')
-rw-r--r-- | app/sql/connection.cc | 4 | ||||
-rw-r--r-- | app/sql/meta_table.cc | 12 | ||||
-rw-r--r-- | app/sql/meta_table.h | 6 |
3 files changed, 13 insertions, 9 deletions
diff --git a/app/sql/connection.cc b/app/sql/connection.cc index 32590d3..a9b13b6 100644 --- a/app/sql/connection.cc +++ b/app/sql/connection.cc @@ -143,7 +143,11 @@ void Connection::Preload() { if (!dummy || !dummy.Step()) return; +#if !defined(USE_SYSTEM_SQLITE) + // This function is only defined in Chromium's version of sqlite. + // Do not call it when using system sqlite. sqlite3Preload(db_); +#endif } bool Connection::BeginTransaction() { diff --git a/app/sql/meta_table.cc b/app/sql/meta_table.cc index 9ec0998..2700d67 100644 --- a/app/sql/meta_table.cc +++ b/app/sql/meta_table.cc @@ -15,18 +15,18 @@ namespace sql { static const char kVersionKey[] = "version"; static const char kCompatibleVersionKey[] = "last_compatible_version"; -// static -bool MetaTable::DoesTableExist(sql::Connection* db) { - DCHECK(db); - return db->DoesTableExist("meta"); -} - MetaTable::MetaTable() : db_(NULL) { } MetaTable::~MetaTable() { } +// static +bool MetaTable::DoesTableExist(sql::Connection* db) { + DCHECK(db); + return db->DoesTableExist("meta"); +} + bool MetaTable::Init(Connection* db, int version, int compatible_version) { DCHECK(!db_ && db); db_ = db; diff --git a/app/sql/meta_table.h b/app/sql/meta_table.h index 4b06337..d5c76c8 100644 --- a/app/sql/meta_table.h +++ b/app/sql/meta_table.h @@ -17,12 +17,12 @@ class Statement; class MetaTable { public: - // Returns true if the 'meta' table exists. - static bool DoesTableExist(Connection* db); - MetaTable(); ~MetaTable(); + // Returns true if the 'meta' table exists. + static bool DoesTableExist(Connection* db); + // Initializes the MetaTableHelper, creating the meta table if necessary. For // new tables, it will initialize the version number to |version| and the // compatible version number to |compatible_version|. |