OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/localized_error.h" | 5 #include "chrome/common/localized_error.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 base::DictionaryValue* summary = new base::DictionaryValue; | 558 base::DictionaryValue* summary = new base::DictionaryValue; |
559 summary->SetString("msg", | 559 summary->SetString("msg", |
560 l10n_util::GetStringUTF16(options.summary_resource_id)); | 560 l10n_util::GetStringUTF16(options.summary_resource_id)); |
561 summary->SetString("failedUrl", failed_url_string); | 561 summary->SetString("failedUrl", failed_url_string); |
562 summary->SetString("hostName", net::IDNToUnicode(failed_url.host(), | 562 summary->SetString("hostName", net::IDNToUnicode(failed_url.host(), |
563 accept_languages)); | 563 accept_languages)); |
564 summary->SetString("productName", | 564 summary->SetString("productName", |
565 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 565 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
566 | 566 |
567 error_strings->SetString( | 567 error_strings->SetString( |
568 "more", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_MORE)); | 568 "details", l10n_util::GetStringUTF16(IDS_ERRORPAGE_NET_BUTTON_DETAILS)); |
569 error_strings->SetString( | 569 error_strings->SetString( |
570 "less", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_LESS)); | 570 "hideDetails", l10n_util::GetStringUTF16( |
| 571 IDS_ERRORPAGE_NET_BUTTON_HIDE_DETAILS)); |
571 error_strings->Set("summary", summary); | 572 error_strings->Set("summary", summary); |
572 | 573 |
573 if (options.details_resource_id != kErrorPagesNoDetails) { | 574 if (options.details_resource_id != kErrorPagesNoDetails) { |
574 error_strings->SetString( | 575 error_strings->SetString( |
575 "errorDetails", l10n_util::GetStringUTF16(options.details_resource_id)); | 576 "errorDetails", l10n_util::GetStringUTF16(options.details_resource_id)); |
576 } | 577 } |
577 | 578 |
578 base::string16 error_string; | 579 base::string16 error_string; |
579 if (error_domain == net::kErrorDomain) { | 580 if (error_domain == net::kErrorDomain) { |
580 // Non-internationalized error string, for debugging Chrome itself. | 581 // Non-internationalized error string, for debugging Chrome itself. |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 #if defined(OS_CHROMEOS) | 871 #if defined(OS_CHROMEOS) |
871 GURL learn_more_url(kAppWarningLearnMoreUrl); | 872 GURL learn_more_url(kAppWarningLearnMoreUrl); |
872 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue(); | 873 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue(); |
873 suggest_learn_more->SetString("msg", | 874 suggest_learn_more->SetString("msg", |
874 l10n_util::GetStringUTF16( | 875 l10n_util::GetStringUTF16( |
875 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); | 876 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); |
876 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); | 877 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); |
877 error_strings->Set("suggestionsLearnMore", suggest_learn_more); | 878 error_strings->Set("suggestionsLearnMore", suggest_learn_more); |
878 #endif // defined(OS_CHROMEOS) | 879 #endif // defined(OS_CHROMEOS) |
879 } | 880 } |
OLD | NEW |