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

Unified Diff: chrome/browser/tab_contents/tab_contents_ssl_helper.cc

Issue 3127009: Convert infobar APIs to UTF-16. (Closed)
Patch Set: works Created 10 years, 4 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: chrome/browser/tab_contents/tab_contents_ssl_helper.cc
diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
index db6d96074b845b0787fc3872e3ad0fe1eb4c1442..a76d48b37675cccb0b24938b0c22d309d6c96449 100644
--- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
+++ b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
@@ -41,9 +41,11 @@ class SSLCertAddedInfoBarDelegate : public ConfirmInfoBarDelegate {
}
// Overridden from ConfirmInfoBarDelegate:
- virtual std::wstring GetMessageText() const {
- return l10n_util::GetStringF(IDS_ADD_CERT_SUCCESS_INFOBAR_LABEL,
- UTF8ToWide(cert_->issuer().GetDisplayName()));
+ virtual string16 GetMessageText() const {
+ // TODO(evanm): GetDisplayName should return UTF-16.
+ return l10n_util::GetStringFUTF16(
+ IDS_ADD_CERT_SUCCESS_INFOBAR_LABEL,
+ UTF8ToUTF16(cert_->issuer().GetDisplayName()));
}
virtual SkBitmap* GetIcon() const {
@@ -54,12 +56,12 @@ class SSLCertAddedInfoBarDelegate : public ConfirmInfoBarDelegate {
return BUTTON_OK;
}
- virtual std::wstring GetButtonLabel(InfoBarButton button) const {
+ virtual string16 GetButtonLabel(InfoBarButton button) const {
switch (button) {
case BUTTON_OK:
- return l10n_util::GetString(IDS_ADD_CERT_SUCCESS_INFOBAR_BUTTON);
+ return l10n_util::GetStringUTF16(IDS_ADD_CERT_SUCCESS_INFOBAR_BUTTON);
default:
- return std::wstring();
+ return string16();
}
}
@@ -114,7 +116,8 @@ class TabContentsSSLHelper::SSLAddCertData : public NotificationObserver {
void ShowErrorInfoBar(const std::wstring& message) {
viettrungluu 2010/08/13 19:22:03 We'll leave converting this to another day. ;)
ShowInfoBar(
- new SimpleAlertInfoBarDelegate(tab_, message, GetCertIcon(), true));
+ new SimpleAlertInfoBarDelegate(tab_, WideToUTF16(message), GetCertIcon(),
viettrungluu 2010/08/13 19:22:03 80 cols
+ true));
}
// NotificationObserver implementation.

Powered by Google App Engine
This is Rietveld 408576698