diff options
5 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/cocoa/extension_install_prompt.mm b/chrome/browser/cocoa/extension_install_prompt.mm index 5b935ce..059bd7d 100644 --- a/chrome/browser/cocoa/extension_install_prompt.mm +++ b/chrome/browser/cocoa/extension_install_prompt.mm @@ -20,7 +20,7 @@ class Profile; 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) { NSAlert* alert = [[[NSAlert alloc] init] autorelease]; NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString( @@ -38,7 +38,7 @@ void ExtensionInstallUI::ShowExtensionInstallUIPromptImpl( is_uninstall ? IDS_EXTENSION_UNINSTALL_PROMPT_HEADING : IDS_EXTENSION_INSTALL_PROMPT_HEADING, UTF8ToUTF16(extension->name()))]; - [alert setInformativeText:base::SysWideToNSString(warning_text)]; + [alert setInformativeText:base::SysUTF16ToNSString(warning_text)]; [alert setAlertStyle:NSWarningAlertStyle]; [alert setIcon:gfx::SkBitmapToNSImage(*icon)]; diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc index c737f8f..0629340 100644 --- a/chrome/browser/extensions/extension_install_ui.cc +++ b/chrome/browser/extensions/extension_install_ui.cc @@ -111,7 +111,7 @@ ExtensionInstallUI::ExtensionInstallUI(Profile* profile) // static void ExtensionInstallUI::ShowExtensionInstallPrompt( Profile* profile, Delegate* delegate, Extension* extension, SkBitmap* icon, - const std::wstring& warning_text) { + const string16& warning_text) { ShowExtensionInstallUIPromptImpl(profile, delegate, extension, icon, warning_text, false); // uninstall == false. } @@ -119,7 +119,7 @@ void ExtensionInstallUI::ShowExtensionInstallPrompt( // static void ExtensionInstallUI::ShowExtensionUninstallPrompt( Profile* profile, Delegate* delegate, Extension* extension, SkBitmap* icon, - const std::wstring& warning_text) { + const string16& warning_text) { ShowExtensionInstallUIPromptImpl(profile, delegate, extension, icon, warning_text, true); // uninstall == true. } @@ -161,7 +161,7 @@ void ExtensionInstallUI::ConfirmInstall(Delegate* delegate, NotificationService::NoDetails()); ShowExtensionInstallPrompt(profile_, delegate, extension, &icon_, - GetInstallWarning(extension)); + WideToUTF16Hack(GetInstallWarning(extension))); } void ExtensionInstallUI::ConfirmUninstall(Delegate* delegate, @@ -174,8 +174,8 @@ void ExtensionInstallUI::ConfirmUninstall(Delegate* delegate, IDR_EXTENSION_DEFAULT_ICON); } - std::wstring message = - l10n_util::GetString(IDS_EXTENSION_UNINSTALL_CONFIRMATION); + string16 message = + l10n_util::GetStringUTF16(IDS_EXTENSION_UNINSTALL_CONFIRMATION); ShowExtensionUninstallPrompt(profile_, delegate, extension, icon, message); } diff --git a/chrome/browser/extensions/extension_install_ui.h b/chrome/browser/extensions/extension_install_ui.h index f2dc82a..b1f9c80 100644 --- a/chrome/browser/extensions/extension_install_ui.h +++ b/chrome/browser/extensions/extension_install_ui.h @@ -39,12 +39,12 @@ class ExtensionInstallUI { Delegate* delegate, Extension* extension, SkBitmap* install_icon, - const std::wstring& warning_text); + const string16& warning_text); static void ShowExtensionUninstallPrompt(Profile* profile, Delegate* delegate, Extension* extension, SkBitmap* install_icon, - const std::wstring& warning_text); + const string16& warning_text); explicit ExtensionInstallUI(Profile* profile); @@ -88,7 +88,7 @@ class ExtensionInstallUI { // NOTE: The implementations of this function is platform-specific. static void ShowExtensionInstallUIPromptImpl( Profile* profile, Delegate* delegate, Extension* extension, - SkBitmap* icon, const std::wstring& warning_text, bool is_uninstall); + SkBitmap* icon, const string16& warning_text, bool is_uninstall); Profile* profile_; MessageLoop* ui_loop_; 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); } diff --git a/chrome/browser/views/extensions/extension_install_prompt.cc b/chrome/browser/views/extensions/extension_install_prompt.cc index 8c5eb02..f2f9a38 100644 --- a/chrome/browser/views/extensions/extension_install_prompt.cc +++ b/chrome/browser/views/extensions/extension_install_prompt.cc @@ -157,7 +157,7 @@ class InstallDialogContent : public views::View, public views::DialogDelegate { // static 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(); @@ -172,5 +172,6 @@ void ExtensionInstallUI::ShowExtensionInstallUIPromptImpl( views::Window::CreateChromeWindow(window->GetNativeHandle(), gfx::Rect(), new InstallDialogContent(delegate, extension, icon, - warning_text, is_uninstall))->Show(); + UTF16ToWideHack(warning_text), + is_uninstall))->Show(); } |