Index: components/error_page/renderer/net_error_helper_core.cc |
diff --git a/components/error_page/renderer/net_error_helper_core.cc b/components/error_page/renderer/net_error_helper_core.cc |
index 847ff0d22ddeb258bc2755f9fc17f0e0720e3150..8fc1f3cede6e2684da7e7ba031d02b317fa21a46 100644 |
--- a/components/error_page/renderer/net_error_helper_core.cc |
+++ b/components/error_page/renderer/net_error_helper_core.cc |
@@ -46,6 +46,9 @@ namespace { |
// Other correction types uses the |kCorrectionResourceTable| array order. |
const int kWebSearchQueryUMAId = 100; |
+// Number of URL correction suggestions to display. |
+const int kUrlCorrectionsToDisplay = 1; |
+ |
struct CorrectionTypeToResourceTable { |
int resource_id; |
const char* correction_type; |
@@ -336,12 +339,15 @@ scoped_ptr<ErrorPageParams> CreateErrorPageParams( |
for (correction_index = 0; |
correction_index < arraysize(kCorrectionResourceTable); |
++correction_index) { |
+ if (params->override_suggestions->GetSize() == kUrlCorrectionsToDisplay) { |
+ break; |
+ } |
if ((*it)->correction_type != |
kCorrectionResourceTable[correction_index].correction_type) { |
continue; |
} |
base::DictionaryValue* suggest = new base::DictionaryValue(); |
- suggest->SetString("header", |
+ suggest->SetString("summary", |
l10n_util::GetStringUTF16( |
kCorrectionResourceTable[correction_index].resource_id)); |
suggest->SetString("urlCorrection", (*it)->url_correction); |