diff options
Diffstat (limited to 'chrome/common/sqlite_utils.cc')
-rw-r--r-- | chrome/common/sqlite_utils.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/common/sqlite_utils.cc b/chrome/common/sqlite_utils.cc index d881a49..e45614a 100644 --- a/chrome/common/sqlite_utils.cc +++ b/chrome/common/sqlite_utils.cc @@ -4,8 +4,17 @@ #include "chrome/common/sqlite_utils.h" +#include "base/file_path.h" #include "base/logging.h" +int OpenSqliteDb(const FilePath& filepath, sqlite3** database) { +#if defined(OS_WIN) + return sqlite3_open16(filepath.value().c_str(), database); +#elif defined(OS_POSIX) + return sqlite3_open(filepath.value().c_str(), database); +#endif +} + bool DoesSqliteTableExist(sqlite3* db, const char* db_name, const char* table_name) { @@ -71,7 +80,6 @@ bool DoesSqliteTableHaveRow(sqlite3* db, const char* table_name) { return s.step() == SQLITE_ROW; } - SQLTransaction::SQLTransaction(sqlite3* db) : db_(db), began_(false) { } |