Commit bc33a291 authored by tby's avatar tby Committed by Commit Bot

[Files Ranking] Change trigger for drive prefetch.

We currently trigger a prefetch of Drive QuickAccess results via the
AppListClientImpl::ViewShown method, which misses some launcher uses
in tablet mode, leading to stale Drive results in zero state.

There's a simple fix for this: AppListControllerImpl::
OnAppListVisibilityChanged is called in exactly the cases we want to
prefetch.

Note: this doesn't solve the issue of possibly stale results if the
user sits on the home screen app list for a long time, that will come
in a follow-up CL.

Bug: 959679
Change-Id: Idf2c489ee39c2625ddd84622f42c160837442e1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1798080Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
Reviewed-by: default avatarJenny Zhang <jennyz@chromium.org>
Auto-Submit: Tony Yeoman <tby@chromium.org>
Commit-Queue: Tony Yeoman <tby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696690}
parent ef0ad847
......@@ -169,8 +169,6 @@ void AppListClientImpl::ViewShown(int64_t display_id) {
current_model_updater_->BadgedItemCount());
}
display_id_ = display_id;
if (search_controller_)
search_controller_->AppListShown();
}
void AppListClientImpl::ActivateItem(int profile_id,
......@@ -226,6 +224,8 @@ void AppListClientImpl::OnAppListTargetVisibilityChanged(bool visible) {
void AppListClientImpl::OnAppListVisibilityChanged(bool visible) {
app_list_visible_ = visible;
if (visible && search_controller_)
search_controller_->AppListShown();
}
void AppListClientImpl::OnFolderCreated(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment