summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/visit_database_unittest.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/visit_database_unittest.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/visit_database_unittest.cc')
-rw-r--r--chrome/browser/history/visit_database_unittest.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/history/visit_database_unittest.cc b/chrome/browser/history/visit_database_unittest.cc
index a646b2c..65197d1 100644
--- a/chrome/browser/history/visit_database_unittest.cc
+++ b/chrome/browser/history/visit_database_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/string_util.h"
@@ -42,12 +43,12 @@ class VisitDatabaseTest : public PlatformTest,
// Test setup.
void SetUp() {
PlatformTest::SetUp();
- PathService::Get(base::DIR_TEMP, &db_file_);
- db_file_.push_back(FilePath::kSeparators[0]);
- db_file_.append(L"VisitTest.db");
+ FilePath temp_dir;
+ PathService::Get(base::DIR_TEMP, &temp_dir);
+ db_file_ = temp_dir.AppendASCII("VisitTest.db");
file_util::Delete(db_file_, false);
- EXPECT_EQ(SQLITE_OK, sqlite3_open(WideToUTF8(db_file_).c_str(), &db_));
+ EXPECT_EQ(SQLITE_OK, OpenSqliteDb(db_file_, &db_));
statement_cache_ = new SqliteStatementCache(db_);
// Initialize the tables for this test.
@@ -71,7 +72,7 @@ class VisitDatabaseTest : public PlatformTest,
return *statement_cache_;
}
- std::wstring db_file_;
+ FilePath db_file_;
sqlite3* db_;
SqliteStatementCache* statement_cache_;
};