| Index: ui/app_list/search_result.h
|
| diff --git a/ui/app_list/search_result.h b/ui/app_list/search_result.h
|
| index c88751dccd11d9981e7cc67b5841a1c54e8594bd..afa0054b0112dd6b279557ec610eb13371f19bee 100644
|
| --- a/ui/app_list/search_result.h
|
| +++ b/ui/app_list/search_result.h
|
| @@ -49,6 +49,16 @@ class APP_LIST_EXPORT SearchResult {
|
| DISPLAY_TYPE_LAST,
|
| };
|
|
|
| + // Type of the search result. This should be set in corresponding subclass's
|
| + // constructor.
|
| + enum ResultType {
|
| + RESULT_UNKNOWN, // Unknown type.
|
| + RESULT_INSTALLED_APP, // Installed apps.
|
| + RESULT_PLAYSTORE_APP, // Uninstalled apps from playstore.
|
| + RESULT_INSTANT_APP, // Instant apps.
|
| + // Add new values here.
|
| + };
|
| +
|
| // A tagged range in search result text.
|
| struct APP_LIST_EXPORT Tag {
|
| // Similar to ACMatchClassification::Style, the style values are not
|
| @@ -135,6 +145,9 @@ class APP_LIST_EXPORT SearchResult {
|
| display_type_ = display_type;
|
| }
|
|
|
| + ResultType result_type() const { return result_type_; }
|
| + void set_result_type(ResultType result_type) { result_type_ = result_type; }
|
| +
|
| int distance_from_origin() { return distance_from_origin_; }
|
| void set_distance_from_origin(int distance) {
|
| distance_from_origin_ = distance;
|
| @@ -223,6 +236,8 @@ class APP_LIST_EXPORT SearchResult {
|
| double relevance_ = 0;
|
| DisplayType display_type_ = DISPLAY_LIST;
|
|
|
| + ResultType result_type_ = RESULT_UNKNOWN;
|
| +
|
| // The Manhattan distance from the origin of all search results to this
|
| // result. This is logged for UMA.
|
| int distance_from_origin_ = -1;
|
|
|