Skip to content

Commit

Permalink
[Launcher impressions] Handle launches from the chips
Browse files Browse the repository at this point in the history
Currently we misattribute app launches from the suggested chips,
counting them as launches from the app tiles, because app results
always have their display type set to 'tile' regardless of where
they are displayed.

This CL adds an extra case to launch that explicitly handles all
chip launches.

Bug: 1076270
Change-Id: I94b545cb1bf9d32899b3f6ec64aa729a9f5fffc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2186789
Reviewed-by: Jenny Zhang <jennyz@chromium.org>
Commit-Queue: Tony Yeoman <tby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#767161}
  • Loading branch information
tby authored and Commit Bot committed May 11, 2020
1 parent de1b3f2 commit c49ce46
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ash/app_list/app_list_controller_impl.cc
Expand Up @@ -1088,8 +1088,16 @@ void AppListControllerImpl::OpenSearchResult(const std::string& result_id,
}

auto* notifier = GetNotifier();
if (notifier)
notifier->NotifyLaunch(result->display_type(), result->id());
if (notifier) {
// Special-case chip results, because the display type of app results
// doesn't account for whether it's being displayed in the suggestion chips
// or app tiles.
if (launched_from == AppListLaunchedFrom::kLaunchedFromSuggestionChip) {
notifier->NotifyLaunch(SearchResultDisplayType::kChip, result->id());
} else {
notifier->NotifyLaunch(result->display_type(), result->id());
}
}

if (presenter_.IsVisibleDeprecated() && result->is_omnibox_search() &&
IsAssistantAllowedAndEnabled() &&
Expand Down

0 comments on commit c49ce46

Please sign in to comment.