Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4335)

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 542843002: [Win] Don't show the add/remove desktop shortcut for single users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698