class Time;
} // namespace base
+const char kACMatchPropertyInputText[] = "input text";
+const char kACMatchPropertyContentsPrefix[] = "match contents prefix";
+const char kACMatchPropertyContentsStartIndex[] = "match contents start index";
+
// AutocompleteMatch ----------------------------------------------------------
// A single result line with classified spans. The autocomplete popup displays
static bool MoreRelevant(const AutocompleteMatch& elem1,
const AutocompleteMatch& elem2);
- // Comparison functions for removing matches with duplicate destinations.
+ // Comparison function for removing matches with duplicate destinations.
// Destinations are compared using |stripped_destination_url|. Pairs of
// matches with empty destinations are treated as differing, since empty
// destinations are expected for non-navigable matches.
- static bool DestinationSortFunc(const AutocompleteMatch& elem1,
- const AutocompleteMatch& elem2);
static bool DestinationsEqual(const AutocompleteMatch& elem1,
const AutocompleteMatch& elem2);
// an extension).
static bool IsSearchType(Type type);
+ // Convenience function to check if |type| is a special search suggest type -
+ // like entity, personalized, profile or postfix.
+ static bool IsSpecializedSearchType(Type type);
+
// Copies the destination_url with "www." stripped off to
// |stripped_destination_url| and also converts https protocol to
// http. These two conversions are merely to allow comparisons to
// is not shown.
bool IsVerbatimType() const;
+ // Returns whether this match or any duplicate of this match can be deleted.
+ // This is used to decide whether we should call DeleteMatch().
+ bool SupportsDeletion() const;
+
// The provider of this match, used to remember which provider the user had
// selected when the input changes. This may be NULL, in which case there is
// no provider (or memory of the user's selection).
base::string16 description;
ACMatchClassifications description_class;
+ // A rich-format version of the display for the dropdown.
+ base::string16 answer_contents;
+ base::string16 answer_type;
+
// The transition type to use when the user opens this match. By default
// this is TYPED. Providers whose matches do not look like URLs should set
// it to GENERATED.
// property and associated value and which is presented in chrome://omnibox.
AdditionalInfo additional_info;
+ // A list of matches culled during de-duplication process, retained to
+ // ensure if a match is deleted, the duplicates are deleted as well.
+ std::vector<AutocompleteMatch> duplicate_matches;
+
#ifndef NDEBUG
// Does a data integrity check on this match.
void Validate() const;