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.h | |
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.h')
-rw-r--r-- | chrome/common/sqlite_utils.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/common/sqlite_utils.h b/chrome/common/sqlite_utils.h index fcf384d..f704141 100644 --- a/chrome/common/sqlite_utils.h +++ b/chrome/common/sqlite_utils.h @@ -13,6 +13,7 @@ #include "third_party/sqlite/preprocessed/sqlite3.h" // forward declarations of classes defined here +class FilePath; class SQLTransaction; class SQLNestedTransaction; class SQLNestedTransactionSite; @@ -311,6 +312,13 @@ class SQLStatement : public scoped_sqlite3_stmt_ptr { DISALLOW_COPY_AND_ASSIGN(SQLStatement); }; +// TODO(estade): wrap the following static functions in a namespace. + +// Opens the DB in the file pointed to by |filepath|. +// See http://www.sqlite.org/capi3ref.html#sqlite3_open for an explanation +// of the return value. +int OpenSqliteDb(const FilePath& filepath, sqlite3** database); + // Returns true if there is a table with the given name in the database. // For the version where a database name is specified, it may be NULL or the // empty string if no database name is necessary. @@ -321,7 +329,6 @@ inline bool DoesSqliteTableExist(sqlite3* db, const char* table_name) { return DoesSqliteTableExist(db, NULL, table_name); } - // Test whether a table has a column matching the provided name and type. // Returns true if the column exist and false otherwise. There are two // versions, one that takes a database name, the other that doesn't. The |