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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 const std::string& error_domain, | 512 const std::string& error_domain, |
513 const GURL& failed_url, | 513 const GURL& failed_url, |
514 bool is_post, | 514 bool is_post, |
515 bool show_stale_load_button, | 515 bool show_stale_load_button, |
516 const std::string& locale, | 516 const std::string& locale, |
517 const std::string& accept_languages, | 517 const std::string& accept_languages, |
518 scoped_ptr<error_page::ErrorPageParams> params, | 518 scoped_ptr<error_page::ErrorPageParams> params, |
519 base::DictionaryValue* error_strings) { | 519 base::DictionaryValue* error_strings) { |
520 bool rtl = LocaleIsRTL(); | 520 bool rtl = LocaleIsRTL(); |
521 error_strings->SetString("textdirection", rtl ? "rtl" : "ltr"); | 521 error_strings->SetString("textdirection", rtl ? "rtl" : "ltr"); |
522 webui::SetFontAndTextDirection(error_strings); | 522 webui::SetTextDirection(error_strings); |
523 | 523 |
524 // Grab the strings and settings that depend on the error type. Init | 524 // Grab the strings and settings that depend on the error type. Init |
525 // options with default values. | 525 // options with default values. |
526 LocalizedErrorMap options = { | 526 LocalizedErrorMap options = { |
527 0, | 527 0, |
528 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, | 528 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, |
529 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, | 529 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, |
530 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, | 530 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, |
531 kErrorPagesNoDetails, | 531 kErrorPagesNoDetails, |
532 SUGGEST_NONE, | 532 SUGGEST_NONE, |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 GURL learn_more_url(kAppWarningLearnMoreUrl); | 886 GURL learn_more_url(kAppWarningLearnMoreUrl); |
887 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue(); | 887 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue(); |
888 suggest_learn_more->SetString("msg", | 888 suggest_learn_more->SetString("msg", |
889 l10n_util::GetStringUTF16( | 889 l10n_util::GetStringUTF16( |
890 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); | 890 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); |
891 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); | 891 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); |
892 error_strings->Set("suggestionsLearnMore", suggest_learn_more); | 892 error_strings->Set("suggestionsLearnMore", suggest_learn_more); |
893 #endif // defined(OS_CHROMEOS) | 893 #endif // defined(OS_CHROMEOS) |
894 } | 894 } |
895 #endif | 895 #endif |
OLD | NEW |