Chromium Code Reviews| Index: components/omnibox/base_search_provider.cc |
| diff --git a/components/omnibox/base_search_provider.cc b/components/omnibox/base_search_provider.cc |
| index cb3654c2b9a1200d9e3635aee8ba02875ce6a9ed..763b952ab203b4c6160efcb23394c09b632696af 100644 |
| --- a/components/omnibox/base_search_provider.cc |
| +++ b/components/omnibox/base_search_provider.cc |
| @@ -111,8 +111,8 @@ AutocompleteMatch BaseSearchProvider::CreateSearchSuggestion( |
| // this match to look as if it was received/created synchronously. |
| SearchSuggestionParser::SuggestResult suggest_result( |
| suggestion, type, suggestion, base::string16(), base::string16(), |
| - base::string16(), base::string16(), std::string(), std::string(), |
| - from_keyword_provider, 0, false, false, base::string16()); |
| + base::string16(), base::string16(), SuggestionAnswer(), std::string(), |
| + std::string(), from_keyword_provider, 0, false, false, base::string16()); |
| suggest_result.set_received_after_last_keystroke(false); |
| return CreateSearchSuggestion( |
| NULL, AutocompleteInput(), from_keyword_provider, suggest_result, |
| @@ -208,6 +208,7 @@ AutocompleteMatch BaseSearchProvider::CreateSearchSuggestion( |
| match.contents_class = suggestion.match_contents_class(); |
| match.answer_contents = suggestion.answer_contents(); |
| match.answer_type = suggestion.answer_type(); |
| + match.answer = suggestion.answer(); |
| if (suggestion.type() == AutocompleteMatchType::SEARCH_SUGGEST_INFINITE) { |
| match.RecordAdditionalInfo( |
| kACMatchPropertyInputText, base::UTF16ToUTF8(input.text())); |
| @@ -430,6 +431,7 @@ void BaseSearchProvider::AddMatchToMap( |
| more_relevant_match.answer_type.empty()) { |
| more_relevant_match.answer_type = less_relevant_match.answer_type; |
| more_relevant_match.answer_contents = less_relevant_match.answer_contents; |
| + more_relevant_match.answer = less_relevant_match.answer; |
| } |
| } |
| } |
| @@ -445,7 +447,7 @@ bool BaseSearchProvider::ParseSuggestResults( |
| client_->AcceptLanguages(), is_keyword_result, results)) |
| return false; |
| - for (std::vector<GURL>::const_iterator it = |
| + for (SuggestionAnswer::URLs::const_iterator it = |
|
groby-ooo-7-16
2014/10/28 00:50:02
Since we're touching this anyways, let's go C++11
Justin Donnelly
2014/10/28 15:20:55
Done. (I can't properly express how much I love ra
|
| results->answers_image_urls.begin(); |
| it != results->answers_image_urls.end(); ++it) |
| client_->PrefetchImage(*it); |