Commit 5814471f authored by calamity's avatar calamity Committed by Commit bot

Respect --profile-directory flag when used with --show-app-list flag.

This CL allows specification of the profile to show the app list for when
launching the app list via the command line.

Currently --show-app-list always uses the last used app list profile, but we
want to allow testers to more easily load the app list for a particular
profile.

On Windows, this can be used for making shorcuts to a particular profile's
app list but this will always bind to the main shortcut due to the app id.

BUG=400874

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

Cr-Commit-Position: refs/heads/master@{#292291}
parent 556ab6c7
......@@ -728,6 +728,11 @@ bool HasPendingUncleanExit(Profile* profile) {
base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
const CommandLine& command_line) {
if (command_line.HasSwitch(switches::kProfileDirectory)) {
return user_data_dir.Append(
command_line.GetSwitchValuePath(switches::kProfileDirectory));
}
// If we are showing the app list then chrome isn't shown so load the app
// list's profile rather than chrome's.
if (command_line.HasSwitch(switches::kShowAppList)) {
......@@ -735,11 +740,6 @@ base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
GetProfilePath(user_data_dir);
}
if (command_line.HasSwitch(switches::kProfileDirectory)) {
return user_data_dir.Append(
command_line.GetSwitchValuePath(switches::kProfileDirectory));
}
return g_browser_process->profile_manager()->GetLastUsedProfileDir(
user_data_dir);
}
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