summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/archived_database.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 20:50:46 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 20:50:46 +0000
commit0a8f88c90840e5f642e6bc64e150229d336eca72 (patch)
tree646c7fd7c7ccd20c8902c9b8058b5f675418c098 /chrome/browser/history/archived_database.cc
parent420949ff13d309c7bbc56173bca33ee4ffafd1b3 (diff)
downloadchromium_src-0a8f88c90840e5f642e6bc64e150229d336eca72.zip
chromium_src-0a8f88c90840e5f642e6bc64e150229d336eca72.tar.gz
chromium_src-0a8f88c90840e5f642e6bc64e150229d336eca72.tar.bz2
Ports all of the chrome/browser/history code to use FilePath, except
for DownloadDatabase, InMemoryDatabase, and RedirectUiTest. Except for in those files, we now only use std::wstring for text strings. This CL also enables two more unittests on Mac. patch by Rohit Rao. http://codereview.chromium.org/48018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12009 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/archived_database.cc')
-rw-r--r--chrome/browser/history/archived_database.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/history/archived_database.cc b/chrome/browser/history/archived_database.cc
index dd44a00..2c1f310 100644
--- a/chrome/browser/history/archived_database.cc
+++ b/chrome/browser/history/archived_database.cc
@@ -4,6 +4,7 @@
#include "base/string_util.h"
#include "chrome/browser/history/archived_database.h"
+#include "chrome/common/sqlite_utils.h"
namespace history {
@@ -22,12 +23,11 @@ ArchivedDatabase::ArchivedDatabase()
ArchivedDatabase::~ArchivedDatabase() {
}
-bool ArchivedDatabase::Init(const std::wstring& file_name) {
- // Open the history database, using the narrow version of open indicates to
- // sqlite that we want the database to be in UTF-8 if it doesn't already
- // exist.
+bool ArchivedDatabase::Init(const FilePath& file_name) {
+ // OpenSqliteDb uses the narrow version of open, indicating to sqlite that we
+ // want the database to be in UTF-8 if it doesn't already exist.
DCHECK(!db_) << "Already initialized!";
- if (sqlite3_open(WideToUTF8(file_name).c_str(), &db_) != SQLITE_OK)
+ if (OpenSqliteDb(file_name, &db_) != SQLITE_OK)
return false;
statement_cache_ = new SqliteStatementCache(db_);
DBCloseScoper scoper(&db_, &statement_cache_);