summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell_mac.mm
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:49:05 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:49:05 +0000
commit63597e4ebc117bb561b93f4d775d787120e6728a (patch)
treea4825625ef2ff06b339e56a30fa5ae80aea29160 /webkit/tools/test_shell/test_shell_mac.mm
parentc48abb01ae7e295e283f190bd05270e835b8d37f (diff)
downloadchromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.zip
chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.gz
chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.bz2
Deprecate most of the remaining wstring file_util functions.
These still exist on Windows due to being used by the installer, but by moving them into the Windows-only block we prevent them from being used in new code. (I am already finding new code using some of these! I am glad to be rid of them.) BUG=24672 Review URL: http://codereview.chromium.org/2850042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_mac.mm')
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm10
1 files changed, 4 insertions, 6 deletions
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index 9b9b9aa..08c1432 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -593,7 +593,7 @@ void TestShell::LoadURLForFrame(const GURL& url,
}
bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
- std::wstring* result)
+ FilePath* result)
{
NSSavePanel* save_panel = [NSSavePanel savePanel];
@@ -605,7 +605,7 @@ bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
/* display the NSSavePanel */
if ([save_panel runModalForDirectory:NSHomeDirectory() file:@""] ==
NSOKButton) {
- result->assign(UTF8ToWide([[save_panel filename] UTF8String]));
+ *result = FilePath([[save_panel filename] fileSystemRepresentation]);
return true;
}
return false;
@@ -672,8 +672,7 @@ base::StringPiece GetDataResource(int resource_id) {
// use a PNG. The GIF doesn't have the color range needed to correctly
// match the TIFF they use in Safari.
path = path.AppendASCII("missingImage.png");
- bool success = file_util::ReadFileToString(path.ToWStringHack(),
- &broken_image_data);
+ bool success = file_util::ReadFileToString(path, &broken_image_data);
if (!success) {
LOG(FATAL) << "Failed reading: " << path.value();
}
@@ -686,8 +685,7 @@ base::StringPiece GetDataResource(int resource_id) {
if (resize_corner_data.empty()) {
FilePath path = GetResourcesFilePath();
path = path.AppendASCII("textAreaResizeCorner.png");
- bool success = file_util::ReadFileToString(path.ToWStringHack(),
- &resize_corner_data);
+ bool success = file_util::ReadFileToString(path, &resize_corner_data);
if (!success) {
LOG(FATAL) << "Failed reading: " << path.value();
}