diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 03:42:44 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 03:42:44 +0000 |
commit | 5fc341a9731fd518bbe6314a3eec3ebc98109de7 (patch) | |
tree | 0e92feba0ba70a245b2bc519bf510bdae79909b8 /chrome/browser/importer | |
parent | 2ac610f6d17d02e62e73ea69a5d7eceedece95c8 (diff) | |
download | chromium_src-5fc341a9731fd518bbe6314a3eec3ebc98109de7.zip chromium_src-5fc341a9731fd518bbe6314a3eec3ebc98109de7.tar.gz chromium_src-5fc341a9731fd518bbe6314a3eec3ebc98109de7.tar.bz2 |
file_util: Fix some callers of CreateNewTempDirectory to remove the deprecated version.
BUG=None
TEST=unit_tests
Patch from Thiago Farina <thiago.farina@gmail.com>.
Review URL: http://codereview.chromium.org/385112
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32487 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/firefox_profile_lock_unittest.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/importer/firefox_profile_lock_unittest.cc b/chrome/browser/importer/firefox_profile_lock_unittest.cc index 3234062..1d86ff5 100644 --- a/chrome/browser/importer/firefox_profile_lock_unittest.cc +++ b/chrome/browser/importer/firefox_profile_lock_unittest.cc @@ -45,17 +45,17 @@ TEST_F(FirefoxProfileLockTest, LockTest) { // Tests basic functionality and verifies that the lock file is deleted after // use. TEST_F(FirefoxProfileLockTest, ProfileLock) { - std::wstring test_path; - ASSERT_TRUE(file_util::CreateNewTempDirectory(L"firefox_profile", - &test_path)); - FilePath lock_file_path = FilePath::FromWStringHack(test_path); + FilePath test_path; + ASSERT_TRUE(file_util::CreateNewTempDirectory( + FILE_PATH_LITERAL("firefox_profile"), &test_path)); + FilePath lock_file_path = test_path; FileAutoDeleter deleter(lock_file_path); lock_file_path = lock_file_path.Append(FirefoxProfileLock::kLockFileName); scoped_ptr<FirefoxProfileLock> lock; EXPECT_EQ(static_cast<FirefoxProfileLock*>(NULL), lock.get()); EXPECT_FALSE(file_util::PathExists(lock_file_path)); - lock.reset(new FirefoxProfileLock(test_path)); + lock.reset(new FirefoxProfileLock(test_path.ToWStringHack())); EXPECT_TRUE(lock->HasAcquired()); EXPECT_TRUE(file_util::PathExists(lock_file_path)); lock->Unlock(); @@ -107,19 +107,19 @@ TEST_F(FirefoxProfileLockTest, ProfileLockOrphaned) { #if !defined(OS_POSIX) // Tests two locks contending for the same lock file. TEST_F(FirefoxProfileLockTest, ProfileLockContention) { - std::wstring test_path; - ASSERT_TRUE(file_util::CreateNewTempDirectory(L"firefox_profile", - &test_path)); - FileAutoDeleter deleter(FilePath::FromWStringHack(test_path)); + FilePath test_path; + ASSERT_TRUE(file_util::CreateNewTempDirectory( + FILE_PATH_LITERAL("firefox_profile"), &test_path)); + FileAutoDeleter deleter(test_path); scoped_ptr<FirefoxProfileLock> lock1; EXPECT_EQ(static_cast<FirefoxProfileLock*>(NULL), lock1.get()); - lock1.reset(new FirefoxProfileLock(test_path)); + lock1.reset(new FirefoxProfileLock(test_path.ToWStringHack())); EXPECT_TRUE(lock1->HasAcquired()); scoped_ptr<FirefoxProfileLock> lock2; EXPECT_EQ(static_cast<FirefoxProfileLock*>(NULL), lock2.get()); - lock2.reset(new FirefoxProfileLock(test_path)); + lock2.reset(new FirefoxProfileLock(test_path.ToWStringHack())); EXPECT_FALSE(lock2->HasAcquired()); lock1->Unlock(); |