Commit 11ae275b authored by noms's avatar noms Committed by Commit bot

[Win] Don't show the add/remove desktop shortcut for single users.

If there's a single user in chrome://settings, you can navigate to
chrome://settings/manageProfile to edit it (even though the UI doesn't
always let you). In this case, however, we shouldn't display the add/remove
desktop shortcut button in the manageProfile overlay (since the shortcut for
single users is a non-profile generic Chrome shortcut)

BUG=409735
TEST=Start Chrome. Ensure you only have one profile.
Go to chrome://settings/manageProfile. There shouldn't be an add/remove
shortcut button.

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

Cr-Commit-Position: refs/heads/master@{#293804}
parent aaea09bc
......@@ -459,6 +459,10 @@ void ManageProfileHandler::RequestHasProfileShortcuts(
if (profile_index == std::string::npos)
return;
// Don't show the add/remove desktop shortcut button in the single user case.
if (cache.GetNumberOfProfiles() <= 1)
return;
const base::FilePath profile_path =
cache.GetPathOfProfileAtIndex(profile_index);
ProfileShortcutManager* shortcut_manager =
......
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