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 "components/error_page/common/localized_error.h" | 5 #include "components/error_page/common/localized_error.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 suggest_network_prediction->SetString("body", | 830 suggest_network_prediction->SetString("body", |
831 l10n_util::GetStringUTF16( | 831 l10n_util::GetStringUTF16( |
832 IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_BODY)); | 832 IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_BODY)); |
833 suggest_network_prediction->SetString( | 833 suggest_network_prediction->SetString( |
834 "noNetworkPredictionTitle", | 834 "noNetworkPredictionTitle", |
835 l10n_util::GetStringUTF16( | 835 l10n_util::GetStringUTF16( |
836 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION)); | 836 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION)); |
837 suggestions->Append(suggest_network_prediction); | 837 suggestions->Append(suggest_network_prediction); |
838 } | 838 } |
839 | 839 |
| 840 // TODO(crbug.com/584615): Does it make sense to show all of these |
| 841 // suggestions on mobile? Several of them seem irrelevant in the mobile |
| 842 // context. |
840 if (options.suggestions & SUGGEST_FIREWALL_CONFIG) { | 843 if (options.suggestions & SUGGEST_FIREWALL_CONFIG) { |
841 base::DictionaryValue* suggest_firewall_config = new base::DictionaryValue; | 844 base::DictionaryValue* suggest_firewall_config = new base::DictionaryValue; |
842 suggest_firewall_config->SetString("header", | 845 suggest_firewall_config->SetString("header", |
843 l10n_util::GetStringUTF16( | 846 l10n_util::GetStringUTF16( |
844 IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_HEADER)); | 847 IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_HEADER)); |
845 suggest_firewall_config->SetString("body", | 848 suggest_firewall_config->SetString("body", |
846 l10n_util::GetStringUTF16( | 849 l10n_util::GetStringUTF16( |
847 IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_BODY)); | 850 IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_BODY)); |
848 suggestions->Append(suggest_firewall_config); | 851 suggestions->Append(suggest_firewall_config); |
849 } | 852 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 | 952 |
950 bool LocalizedError::HasStrings(const std::string& error_domain, | 953 bool LocalizedError::HasStrings(const std::string& error_domain, |
951 int error_code) { | 954 int error_code) { |
952 // Whether or not the there are strings for an error does not depend on | 955 // Whether or not the there are strings for an error does not depend on |
953 // whether or not the page was be generated by a POST, so just claim it was | 956 // whether or not the page was be generated by a POST, so just claim it was |
954 // not. | 957 // not. |
955 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != NULL; | 958 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != NULL; |
956 } | 959 } |
957 | 960 |
958 } // namespace error_page | 961 } // namespace error_page |
OLD | NEW |