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

Unified Diff: webkit/tools/test_shell/test_shell_mac.mm

Issue 2850042: Deprecate more old filepath functions. (Closed)
Patch Set: rebase Created 10 years, 5 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
Index: webkit/tools/test_shell/test_shell_mac.mm
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index 9b9b9aa231ec03acc4de5b2555cf3a51adc251c8..08c1432deccf52d9509b1df90f6d3f9c0af2d4f3 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();
}

Powered by Google App Engine
This is Rietveld 408576698