summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/download/download_manager.cc2
-rw-r--r--chrome/browser/net/url_fixer_upper_unittest.cc2
-rw-r--r--chrome/test/ui/npapi_test_helper.cc16
-rw-r--r--chrome/test/ui/npapi_test_helper.h18
-rw-r--r--net/base/file_stream_unittest.cc3
-rw-r--r--net/tools/tld_cleanup/tld_cleanup.cc3
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc4
7 files changed, 23 insertions, 25 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index f0cdb97..c83056f 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -642,7 +642,7 @@ void DownloadManager::CheckIfSuggestedPathExists(DownloadCreateInfo* info) {
// Create an empty file at the suggested path so that we don't allocate the
// same "non-existant" path to multiple downloads.
// See: http://code.google.com/p/chromium/issues/detail?id=3662
- file_util::WriteFile(info->suggested_path.ToWStringHack(), "", 0);
+ file_util::WriteFile(info->suggested_path, "", 0);
}
// Now we return to the UI thread.
diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc
index 05ff728..61ba171 100644
--- a/chrome/browser/net/url_fixer_upper_unittest.cc
+++ b/chrome/browser/net/url_fixer_upper_unittest.cc
@@ -180,7 +180,7 @@ static bool MakeTempFile(const FilePath& dir,
const FilePath& file_name,
FilePath* full_path) {
*full_path = dir.Append(file_name);
- return file_util::WriteFile(full_path->ToWStringHack(), NULL, 0) == 0;
+ return file_util::WriteFile(*full_path, "", 0) == 0;
}
// Returns true if the given URL is a file: URL that matches the given file
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();
}
diff --git a/chrome/test/ui/npapi_test_helper.h b/chrome/test/ui/npapi_test_helper.h
index 6af2d73..b914916 100644
--- a/chrome/test/ui/npapi_test_helper.h
+++ b/chrome/test/ui/npapi_test_helper.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_TEST_HELPER_H_
-#define CHROME_TEST_HELPER_H_
+#ifndef CHROME_TEST_UI_NPAPI_TEST_HELPER_H_
+#define CHROME_TEST_UI_NPAPI_TEST_HELPER_H_
#include "chrome/test/ui/ui_test.h"
@@ -14,21 +14,21 @@ class NPAPITester : public UITest {
virtual void SetUp();
virtual void TearDown();
-private:
- std::wstring plugin_dll_;
+ private:
+ FilePath plugin_dll_;
};
// Helper class for NPAPI plugin UI tests, which need the browser window
// to be visible.
class NPAPIVisiblePluginTester : public NPAPITester {
- protected:
- virtual void SetUp();
+ protected:
+ virtual void SetUp();
};
// Helper class for NPAPI plugin UI tests which use incognito mode.
class NPAPIIncognitoTester : public NPAPITester {
- protected:
- virtual void SetUp();
+ protected:
+ virtual void SetUp();
};
-#endif // CHROME_TEST_HELPER_H_
+#endif // CHROME_TEST_UI_NPAPI_TEST_HELPER_H_
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index 76909eb..a7a650f 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -22,8 +22,7 @@ class FileStreamTest : public PlatformTest {
PlatformTest::SetUp();
file_util::CreateTemporaryFile(&temp_file_path_);
- file_util::WriteFile(temp_file_path_.ToWStringHack(),
- kTestData, kTestDataSize);
+ file_util::WriteFile(temp_file_path_, kTestData, kTestDataSize);
}
virtual void TearDown() {
file_util::Delete(temp_file_path_, false);
diff --git a/net/tools/tld_cleanup/tld_cleanup.cc b/net/tools/tld_cleanup/tld_cleanup.cc
index d915c4d..71c16c0 100644
--- a/net/tools/tld_cleanup/tld_cleanup.cc
+++ b/net/tools/tld_cleanup/tld_cleanup.cc
@@ -58,8 +58,7 @@ bool WriteRules(const StringSet& rules, FilePath outfile) {
data.append(";\n");
- int written = file_util::WriteFile(outfile.ToWStringHack(), data.data(),
- data.size());
+ int written = file_util::WriteFile(outfile, data.data(), data.size());
return written == static_cast<int>(data.size());
}
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 16661d8..4b74300 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -189,7 +189,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode) {
if (!file_util::CreateTemporaryFile(&fontconfig_path)) {
LOG(FATAL) << "failed to create temp font config file";
}
- if (-1 == file_util::WriteFile(fontconfig_path.ToWStringHack(),
+ if (-1 == file_util::WriteFile(fontconfig_path,
font_config_xml.data(),
font_config_xml.length())) {
LOG(FATAL) << "failed to write temp font config file";
@@ -278,7 +278,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode) {
if (!file_util::CreateTemporaryFile(g_ahem_path)) {
LOG(FATAL) << "failed to create temp ahem font";
}
- if (-1 == file_util::WriteFile(g_ahem_path->ToWStringHack(), ahem_font.data(),
+ if (-1 == file_util::WriteFile(g_ahem_path, ahem_font.data(),
ahem_font.length())) {
LOG(FATAL) << "failed to write temp ahem font";
}