Index: chrome/browser/ui/webui/options/manage_profile_handler.cc |
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
index 41689f80a6da7c7bc0cc5074cfee7277a5f75cda..4806e44699d48130a4ae77ed0ccf8801c81ccb00 100644 |
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc |
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
@@ -498,9 +498,15 @@ void ManageProfileHandler::OnCreateSupervisedUserPrefChange() { |
void ManageProfileHandler::OnHasProfileShortcuts(bool has_shortcuts) { |
Dan Beam
2014/09/04 22:59:09
i'm slightly more partial to CHECK() than an if ->
noms (inactive)
2014/09/05 14:54:41
You can manually navigate to chrome://settings/man
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
Dan Beam
2014/09/04 22:59:09
nit: if the code stays as it:
if (!switches::IsNe
noms (inactive)
2014/09/05 14:54:41
Done.
|
- const base::FundamentalValue has_shortcuts_value(has_shortcuts); |
- web_ui()->CallJavascriptFunction( |
- "ManageProfileOverlay.receiveHasProfileShortcuts", has_shortcuts_value); |
+ // If --new-avatar-menu is on, don't show the add/remove desktop |
+ // shortcut button in the single user case. |
+ const ProfileInfoCache& cache = |
+ g_browser_process->profile_manager()->GetProfileInfoCache(); |
+ if (switches::IsNewAvatarMenu() && cache.GetNumberOfProfiles() > 1) { |
noms (inactive)
2014/09/04 21:24:13
Question for you: Even in the pre-mirror world, if
Dan Beam
2014/09/04 22:59:09
i don't see it on Linux. you should hide irreleva
noms (inactive)
2014/09/05 14:54:41
This is just for Windows (Linux doesn't have deskt
|
+ const base::FundamentalValue has_shortcuts_value(has_shortcuts); |
+ web_ui()->CallJavascriptFunction( |
+ "ManageProfileOverlay.receiveHasProfileShortcuts", has_shortcuts_value); |
+ } |
} |
void ManageProfileHandler::AddProfileShortcut(const base::ListValue* args) { |