Commit 9bbd8ea8 authored by tapted's avatar tapted Committed by Commit bot

Only schedule a warmup when a user has the app launcher enabled.

This avoids a possibly janky delayed UI task for users that don't use
the app launcher.

After this, a user enabling the app list for the first time won't have a
warmed-up UI but that shouldn't matter because the education page
doesn't try to show it, and ShowForAppInstall() will warm it up.

BUG=431326, 292969

Review URL: https://codereview.chromium.org/1031223002

Cr-Commit-Position: refs/heads/master@{#322451}
parent c99f380c
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/shell_integration.h" #include "chrome/browser/shell_integration.h"
#include "chrome/browser/ui/app_list/app_list_util.h"
#include "chrome/browser/ui/ash/app_list/app_list_service_ash.h" #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
#include "chrome/browser/ui/views/app_list/win/activation_tracker_win.h" #include "chrome/browser/ui/views/app_list/win/activation_tracker_win.h"
#include "chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h" #include "chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h"
...@@ -343,6 +344,12 @@ void AppListServiceWin::ScheduleWarmup() { ...@@ -343,6 +344,12 @@ void AppListServiceWin::ScheduleWarmup() {
case chrome::VersionInfo::CHANNEL_DEV: case chrome::VersionInfo::CHANNEL_DEV:
case chrome::VersionInfo::CHANNEL_BETA: case chrome::VersionInfo::CHANNEL_BETA:
case chrome::VersionInfo::CHANNEL_STABLE: case chrome::VersionInfo::CHANNEL_STABLE:
// Except on Canary, don't bother scheduling an app launcher warmup when
// it's not already enabled. Always schedule on Canary while collecting
// profiler data (see comment above).
if (!IsAppLauncherEnabled())
return;
// Profiler instrumentations are not enabled. // Profiler instrumentations are not enabled.
break; break;
} }
......
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