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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 l10n_util::GetStringUTF16(options.summary_resource_id), | 539 l10n_util::GetStringUTF16(options.summary_resource_id), |
540 l10n_util::GetStringUTF16(platform_string_id))); | 540 l10n_util::GetStringUTF16(platform_string_id))); |
541 } | 541 } |
542 #endif // defined(OS_MACOSX) || defined(OS_WIN) | 542 #endif // defined(OS_MACOSX) || defined(OS_WIN) |
543 | 543 |
544 if (options.suggestions & SUGGEST_RELOAD) { | 544 if (options.suggestions & SUGGEST_RELOAD) { |
545 if (!is_post) { | 545 if (!is_post) { |
546 DictionaryValue* reload_button = new DictionaryValue; | 546 DictionaryValue* reload_button = new DictionaryValue; |
547 reload_button->SetString("msg", | 547 reload_button->SetString("msg", |
548 l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_RELOAD)); | 548 l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_RELOAD)); |
549 reload_button->SetString("reloadUrl", failed_url_string); | 549 reload_button->SetString("reloadUrl", failed_url.spec()); |
550 error_strings->Set("reload", reload_button); | 550 error_strings->Set("reload", reload_button); |
551 } else { | 551 } else { |
552 // If the page was created by a post, it can't be reloaded in the same | 552 // If the page was created by a post, it can't be reloaded in the same |
553 // way, so just add a suggestion instead. | 553 // way, so just add a suggestion instead. |
554 // TODO(mmenke): Make the reload button bring up the repost confirmation | 554 // TODO(mmenke): Make the reload button bring up the repost confirmation |
555 // dialog for pages resulting from posts. | 555 // dialog for pages resulting from posts. |
556 DictionaryValue* suggest_reload_repost = new DictionaryValue; | 556 DictionaryValue* suggest_reload_repost = new DictionaryValue; |
557 suggest_reload_repost->SetString("header", | 557 suggest_reload_repost->SetString("header", |
558 l10n_util::GetStringUTF16( | 558 l10n_util::GetStringUTF16( |
559 IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_HEADER)); | 559 IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_HEADER)); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 #if defined(OS_CHROMEOS) | 739 #if defined(OS_CHROMEOS) |
740 GURL learn_more_url(kAppWarningLearnMoreUrl); | 740 GURL learn_more_url(kAppWarningLearnMoreUrl); |
741 DictionaryValue* suggest_learn_more = new DictionaryValue(); | 741 DictionaryValue* suggest_learn_more = new DictionaryValue(); |
742 suggest_learn_more->SetString("msg", | 742 suggest_learn_more->SetString("msg", |
743 l10n_util::GetStringUTF16( | 743 l10n_util::GetStringUTF16( |
744 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); | 744 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); |
745 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); | 745 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); |
746 error_strings->Set("suggestionsLearnMore", suggest_learn_more); | 746 error_strings->Set("suggestionsLearnMore", suggest_learn_more); |
747 #endif // defined(OS_CHROMEOS) | 747 #endif // defined(OS_CHROMEOS) |
748 } | 748 } |
OLD | NEW |