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

Unified Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 31014: Port DictionaryValue to use string16 instead of wstring. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_blocking_page.cc
===================================================================
--- chrome/browser/ssl/ssl_blocking_page.cc (revision 10828)
+++ chrome/browser/ssl/ssl_blocking_page.cc (working copy)
@@ -44,23 +44,30 @@
// Let's build the html error page.
DictionaryValue strings;
SSLErrorInfo error_info = delegate_->GetSSLErrorInfo(error_);
- strings.SetString(L"title",
- l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_TITLE));
- strings.SetString(L"headLine", error_info.title());
- strings.SetString(L"description", error_info.details());
+ strings.SetString(
+ ASCIIToUTF16("title"),
+ WideToUTF16Hack(l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_TITLE)));
+ strings.SetString(ASCIIToUTF16("headLine"),
+ WideToUTF16Hack(error_info.title()));
+ strings.SetString(ASCIIToUTF16("description"),
+ WideToUTF16Hack(error_info.details()));
- strings.SetString(L"moreInfoTitle",
- l10n_util::GetString(IDS_CERT_ERROR_EXTRA_INFO_TITLE));
+ strings.SetString(
+ ASCIIToUTF16("moreInfoTitle"),
+ WideToUTF16Hack(l10n_util::GetString(IDS_CERT_ERROR_EXTRA_INFO_TITLE)));
SetExtraInfo(&strings, error_info.extra_information());
- strings.SetString(L"proceed",
- l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_PROCEED));
- strings.SetString(L"exit",
- l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_EXIT));
+ strings.SetString(
+ ASCIIToUTF16("proceed"),
+ WideToUTF16Hack(l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_PROCEED)));
+ strings.SetString(
+ ASCIIToUTF16("exit"),
+ WideToUTF16Hack(l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_EXIT)));
- strings.SetString(L"textdirection",
+ strings.SetString(
+ ASCIIToUTF16("textdirection"),
(l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
- L"rtl" : L"ltr");
+ ASCIIToUTF16("rtl") : ASCIIToUTF16("ltr"));
static const StringPiece html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
@@ -131,15 +138,16 @@
DictionaryValue* strings,
const std::vector<std::wstring>& extra_info) {
DCHECK(extra_info.size() < 5); // We allow 5 paragraphs max.
- const std::wstring keys[5] = {
- L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5"
+ const string16 keys[5] = {
+ ASCIIToUTF16("moreInfo1"), ASCIIToUTF16("moreInfo2"),
+ ASCIIToUTF16("moreInfo3"), ASCIIToUTF16("moreInfo4"),
+ ASCIIToUTF16("moreInfo5")
};
int i;
for (i = 0; i < static_cast<int>(extra_info.size()); i++) {
- strings->SetString(keys[i], extra_info[i]);
+ strings->SetString(keys[i], WideToUTF16Hack(extra_info[i]));
}
for (;i < 5; i++) {
- strings->SetString(keys[i], L"");
+ strings->SetString(keys[i], ASCIIToUTF16(""));
}
}
-
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698