Index: components/omnibox/search_provider.h |
diff --git a/components/omnibox/search_provider.h b/components/omnibox/search_provider.h |
index c8307c38db2663f36dc4fc8ee6a2bc38f7de96d6..12b921991ce6bc2dec39fa86a0a15b81992fdac6 100644 |
--- a/components/omnibox/search_provider.h |
+++ b/components/omnibox/search_provider.h |
@@ -11,6 +11,9 @@ |
#ifndef COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_ |
#define COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_ |
+#include <string> |
+#include <vector> |
+ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
@@ -85,6 +88,7 @@ class SearchProvider : public BaseSearchProvider, |
FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, SuggestQueryUsesToken); |
FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, SessionToken); |
FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, AnswersCache); |
+ FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, RemoveExtraAnswers); |
FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, GetDestinationURL); |
FRIEND_TEST_ALL_PREFIXES(InstantExtendedPrefetchTest, ClearPrefetchedResults); |
FRIEND_TEST_ALL_PREFIXES(InstantExtendedPrefetchTest, SetPrefetchQuery); |
@@ -231,6 +235,10 @@ class SearchProvider : public BaseSearchProvider, |
// Converts the parsed results to a set of AutocompleteMatches, |matches_|. |
void ConvertResultsToAutocompleteMatches(); |
+ // Remove answer contents from each match in |matches| other than the first |
+ // that appears. |
+ static void RemoveExtraAnswers(ACMatches* matches); |
+ |
// Returns an iterator to the first match in |matches_| which might |
// be chosen as default. |
ACMatches::const_iterator FindTopMatch() const; |