Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2397)

Unified Diff: chrome/installer/util/copy_tree_work_item_unittest.cc

Issue 276016: Remove some deprecated file_util wstring functions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: lint Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/copy_tree_work_item.cc ('k') | chrome/installer/util/delete_after_reboot_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/copy_tree_work_item_unittest.cc
===================================================================
--- chrome/installer/util/copy_tree_work_item_unittest.cc (revision 29006)
+++ chrome/installer/util/copy_tree_work_item_unittest.cc (working copy)
@@ -61,11 +61,11 @@
file.close();
}
- bool IsFileInUse(const std::wstring& path) {
+ bool IsFileInUse(const FilePath& path) {
if (!file_util::PathExists(path))
return false;
- HANDLE handle = ::CreateFile(path.c_str(), FILE_ALL_ACCESS,
+ HANDLE handle = ::CreateFile(path.value().c_str(), FILE_ALL_ACCESS,
NULL, NULL, OPEN_EXISTING, NULL, NULL);
if (handle == INVALID_HANDLE_VALUE)
return true;
@@ -478,10 +478,10 @@
file_name_from.ToWStringHack(), file_name_to.ToWStringHack(),
temp_dir_.ToWStringHack(), WorkItem::NEW_NAME_IF_IN_USE,
alternate_to.ToWStringHack()));
- if (IsFileInUse(file_name_to.value()))
+ if (IsFileInUse(file_name_to))
PlatformThread::Sleep(2000);
// If file is still in use, the rest of the test will fail.
- ASSERT_FALSE(IsFileInUse(file_name_to.value()));
+ ASSERT_FALSE(IsFileInUse(file_name_to));
EXPECT_TRUE(work_item->Do());
EXPECT_TRUE(file_util::PathExists(file_name_from));
« no previous file with comments | « chrome/installer/util/copy_tree_work_item.cc ('k') | chrome/installer/util/delete_after_reboot_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698