Chromium Code Reviews| Index: chrome/browser/ssl/ssl_blocking_page.cc |
| =================================================================== |
| --- chrome/browser/ssl/ssl_blocking_page.cc (revision 113437) |
| +++ chrome/browser/ssl/ssl_blocking_page.cc (working copy) |
| @@ -6,6 +6,7 @@ |
| #include "base/i18n/rtl.h" |
| #include "base/metrics/histogram.h" |
| +#include "base/string16.h" |
| #include "base/string_piece.h" |
| #include "base/utf_string_conversions.h" |
| #include "base/values.h" |
| @@ -78,7 +79,6 @@ |
| strings.SetString("moreInfoTitle", |
| l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_TITLE)); |
| - SetExtraInfo(&strings, error_info.extra_information()); |
| int resource_id; |
| if (overridable_) { |
| @@ -89,12 +89,20 @@ |
| l10n_util::GetStringUTF16(IDS_SSL_BLOCKING_PAGE_PROCEED)); |
| strings.SetString("exit", |
| l10n_util::GetStringUTF16(IDS_SSL_BLOCKING_PAGE_EXIT)); |
| + |
| + // error_info.extra_information() returns const ref, but we need to add |
| + // something. So, add to a copy. |
| + std::vector<string16> extra_info = error_info.extra_information(); |
| + extra_info.push_back( |
| + l10n_util::GetStringUTF16(IDS_SSL_BLOCKING_PAGE_SHOULD_NOT_PROCEED)); |
|
wtc
2011/12/08 00:35:37
Many of the certificate error messages have some s
Ryan Sleevi
2011/12/08 00:45:11
Should this logic be pushed into SSLErrorInfo::Cre
|
| + SetExtraInfo(&strings, extra_info); |
| } else { |
| resource_id = IDR_SSL_ERROR_HTML; |
| strings.SetString("title", |
| l10n_util::GetStringUTF16(IDS_SSL_ERROR_PAGE_TITLE)); |
| strings.SetString("back", |
| l10n_util::GetStringUTF16(IDS_SSL_ERROR_PAGE_BACK)); |
| + SetExtraInfo(&strings, error_info.extra_information()); |
| } |
| strings.SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr"); |
| @@ -168,7 +176,7 @@ |
| void SSLBlockingPage::SetExtraInfo( |
| DictionaryValue* strings, |
| const std::vector<string16>& extra_info) { |
| - DCHECK(extra_info.size() < 5); // We allow 5 paragraphs max. |
| + DCHECK_LT(extra_info.size(), 5U); // We allow 5 paragraphs max. |
| const char* keys[5] = { |
| "moreInfo1", "moreInfo2", "moreInfo3", "moreInfo4", "moreInfo5" |
| }; |