summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui/npapi_test_helper.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 18:43:35 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 18:43:35 +0000
commit7ff3f63b8c66408a382adc88458a6e70038cad8d (patch)
tree19ee652ca357c782b5feb0e6bdbf938b0382a092 /chrome/test/ui/npapi_test_helper.cc
parent40dddd98e0001614e641052fc5bc9a0c68dfc129 (diff)
downloadchromium_src-7ff3f63b8c66408a382adc88458a6e70038cad8d.zip
chromium_src-7ff3f63b8c66408a382adc88458a6e70038cad8d.tar.gz
chromium_src-7ff3f63b8c66408a382adc88458a6e70038cad8d.tar.bz2
Remove the unnecessary conversion to wstring when calling file_util::WriteFile.
Also use FilePath in npapi_test_helper. BUG=24672 TEST=compiled Review URL: http://codereview.chromium.org/266061 Patch from Thiago Farina <tfarina@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/npapi_test_helper.cc')
-rw-r--r--chrome/test/ui/npapi_test_helper.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/test/ui/npapi_test_helper.cc b/chrome/test/ui/npapi_test_helper.cc
index 11e1c98..e3913b0 100644
--- a/chrome/test/ui/npapi_test_helper.cc
+++ b/chrome/test/ui/npapi_test_helper.cc
@@ -10,6 +10,7 @@
#include "chrome/test/ui/npapi_test_helper.h"
+#include "base/file_util.h"
#include "chrome/common/chrome_switches.h"
NPAPITester::NPAPITester()
@@ -19,20 +20,19 @@ NPAPITester::NPAPITester()
void NPAPITester::SetUp() {
// We need to copy our test-plugin into the plugins directory so that
// the browser can load it.
- std::wstring plugins_directory = browser_directory_.ToWStringHack() +
- L"\\plugins";
- std::wstring plugin_src = browser_directory_.ToWStringHack() +
- L"\\npapi_test_plugin.dll";
- plugin_dll_ = plugins_directory + L"\\npapi_test_plugin.dll";
+ FilePath plugins_directory = browser_directory_.AppendASCII("plugins");
- CreateDirectory(plugins_directory.c_str(), NULL);
- CopyFile(plugin_src.c_str(), plugin_dll_.c_str(), FALSE);
+ FilePath plugin_src = browser_directory_.AppendASCII("npapi_test_plugin.dll");
+ plugin_dll_ = plugins_directory.AppendASCII("npapi_test_plugin.dll");
+
+ file_util::CreateDirectory(plugins_directory);
+ file_util::CopyFile(plugin_src, plugin_dll_);
UITest::SetUp();
}
void NPAPITester::TearDown() {
- DeleteFile(plugin_dll_.c_str());
+ file_util::Delete(plugin_dll_, false);
UITest::TearDown();
}