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

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: review comments 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..09b406bc3dac015351b0d83238e5f4af47d1fdc9 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -497,6 +497,12 @@ void ManageProfileHandler::OnCreateSupervisedUserPrefChange() {
void ManageProfileHandler::OnHasProfileShortcuts(bool has_shortcuts) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
Dan Beam 2014/09/05 19:19:15 what happened to the flag check?
noms (inactive) 2014/09/05 19:50:37 Maybe I misunderstood your reply, but I thought yo
Dan Beam 2014/09/05 22:16:43 where is the code that hides the useless UI?
noms (inactive) 2014/09/08 14:30:18 Initially, in manage_profile_overlay.js, in didSho
+ const ProfileInfoCache& cache =
+ g_browser_process->profile_manager()->GetProfileInfoCache();
+
+ // Don't show the add/remove desktop shortcut button in the single user case.
+ if (cache.GetNumberOfProfiles() <= 1)
+ return;
const base::FundamentalValue has_shortcuts_value(has_shortcuts);
web_ui()->CallJavascriptFunction(
« 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