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

Unified Diff: webkit/tools/test_shell/test_shell_gtk.cc

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_gtk.cc
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 92f1f199bf91c813c9facfc717ce3fe474ce2d92..3d082538e7789a300cf77c326c171b13dca528b1 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -491,7 +491,8 @@ void TestShell::ResizeSubViews() {
iter != TestShell::windowList()->end(); iter++) {
GtkWindow* window = *iter;
TestShell* shell =
- static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shell"));
+ static_cast<TestShell*>(g_object_get_data(G_OBJECT(window),
+ "test-shell"));
shell->DumpBackForwardList(result);
}
}
@@ -505,7 +506,8 @@ void TestShell::ResizeSubViews() {
GtkWindow* window = *(TestShell::windowList()->begin());
TestShell* shell =
- static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shell"));
+ static_cast<TestShell*>(g_object_get_data(G_OBJECT(window),
+ "test-shell"));
// Clear focus between tests.
shell->m_focusedWidgetHost = NULL;
@@ -570,9 +572,8 @@ void TestShell::LoadURLForFrame(const GURL& url,
new TestNavigationEntry(-1, url, std::wstring(), frame_name));
}
-// TODO(agl): PromptForSaveFile should use FilePath
bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
- std::wstring* result) {
+ FilePath* result) {
GtkWidget* dialog;
dialog = gtk_file_chooser_dialog_new(WideToUTF8(prompt_title).c_str(),
GTK_WINDOW(m_mainWnd),
@@ -589,7 +590,7 @@ bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
}
char* path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
gtk_widget_destroy(dialog);
- *result = UTF8ToWide(path);
+ *result = FilePath(path);
g_free(path);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698