diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 05:47:15 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 05:47:15 +0000 |
commit | c870c76357fc05d3f7181f8121181f983bd25e7f (patch) | |
tree | 4757d379e295e2a594e63d53a0d3b4fe51c77379 /chrome/common/sqlite_utils.cc | |
parent | 0b88baec73430cb25a4d6181b47c221f99fe5d0f (diff) | |
download | chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.zip chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.tar.gz chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.tar.bz2 |
Safe browsing cleanup:
* wstring -> FilePath
* create versions of WriteFile/ReadFile with FilePath signatures
Review URL: http://codereview.chromium.org/19610
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8797 0039d316-1c4b-4281-b951-d872f2087c98
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) { } |