summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/extension_install_prompt_gtk.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 23:53:18 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 23:53:18 +0000
commit17164388ede75bf12fbf017b6dfc5a7fdcc60e75 (patch)
tree267c9396c83cd26b0d2136220e1f6250cca0f961 /chrome/browser/gtk/extension_install_prompt_gtk.cc
parent300e84b6650e61c3ad44711794d26eda4ba049f1 (diff)
downloadchromium_src-17164388ede75bf12fbf017b6dfc5a7fdcc60e75.zip
chromium_src-17164388ede75bf12fbf017b6dfc5a7fdcc60e75.tar.gz
chromium_src-17164388ede75bf12fbf017b6dfc5a7fdcc60e75.tar.bz2
extensions: Properly use string16 for Unicode text.
BUG=29850 Review URL: http://codereview.chromium.org/477011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34203 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/extension_install_prompt_gtk.cc')
-rw-r--r--chrome/browser/gtk/extension_install_prompt_gtk.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/gtk/extension_install_prompt_gtk.cc b/chrome/browser/gtk/extension_install_prompt_gtk.cc
index bfeb878..e48ac0b 100644
--- a/chrome/browser/gtk/extension_install_prompt_gtk.cc
+++ b/chrome/browser/gtk/extension_install_prompt_gtk.cc
@@ -51,7 +51,7 @@ void OnDialogResponse(GtkDialog* dialog, int response_id,
void ShowInstallPromptDialog(GtkWindow* parent, SkBitmap* skia_icon,
Extension *extension,
ExtensionInstallUI::Delegate *delegate,
- const std::string& warning_text,
+ const string16& warning_text,
bool is_uninstall) {
// Build the dialog.
int title_id = is_uninstall ? IDS_EXTENSION_UNINSTALL_PROMPT_TITLE :
@@ -95,7 +95,7 @@ void ShowInstallPromptDialog(GtkWindow* parent, SkBitmap* skia_icon,
gtk_label_set_selectable(GTK_LABEL(heading_label), TRUE);
gtk_box_pack_start(GTK_BOX(right_column_area), heading_label, TRUE, TRUE, 0);
- GtkWidget* warning_label = gtk_label_new(warning_text.c_str());
+ GtkWidget* warning_label = gtk_label_new(UTF16ToUTF8(warning_text).c_str());
gtk_label_set_line_wrap(GTK_LABEL(warning_label), TRUE);
gtk_widget_set_size_request(warning_label, kRightColumnWidth, -1);
gtk_misc_set_alignment(GTK_MISC(warning_label), 0.0, 0.5);
@@ -111,7 +111,7 @@ void ShowInstallPromptDialog(GtkWindow* parent, SkBitmap* skia_icon,
void ExtensionInstallUI::ShowExtensionInstallUIPromptImpl(
Profile* profile, Delegate* delegate, Extension* extension, SkBitmap* icon,
- const std::wstring& warning_text, bool is_uninstall) {
+ const string16& warning_text, bool is_uninstall) {
Browser* browser = BrowserList::GetLastActiveWithProfile(profile);
if (!browser) {
delegate->InstallUIProceed();
@@ -125,7 +125,6 @@ void ExtensionInstallUI::ShowExtensionInstallUIPromptImpl(
return;
}
- std::string warning_ascii = WideToASCII(warning_text);
ShowInstallPromptDialog(browser_window->window(), icon, extension,
- delegate, warning_ascii, is_uninstall);
+ delegate, warning_text, is_uninstall);
}