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

Unified Diff: chrome/browser/resources/md_user_manager/create_profile.js

Issue 2498153002: [MD Settings][MD User Manager] create/manage profile desktop shortcut (Windows only) (Closed)
Patch Set: Addressed comments Created 4 years, 1 month 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
Index: chrome/browser/resources/md_user_manager/create_profile.js
diff --git a/chrome/browser/resources/md_user_manager/create_profile.js b/chrome/browser/resources/md_user_manager/create_profile.js
index d997d9e4567fa90c90489749154c5c74425e672a..ea4c28f2f0029e5c1e77c32719894c46b979c098 100644
--- a/chrome/browser/resources/md_user_manager/create_profile.js
+++ b/chrome/browser/resources/md_user_manager/create_profile.js
@@ -90,6 +90,15 @@ Polymer({
},
/**
+ * if true, a desktop shortcut will be created for the new profile.
+ * @private {boolean}
+ */
+ createShortcut_: {
+ type: Boolean,
+ value: true
+ },
+
+ /**
* True if the new profile is a supervised profile.
* @private {boolean}
*/
@@ -117,7 +126,19 @@ Polymer({
},
/** @private {!signin.ProfileBrowserProxy} */
- browserProxy_: Object
+ browserProxy_: Object,
+
+ /**
+ * True if the profile shortcuts feature is enabled.
+ * @private
+ */
+ isProfileShortcutsEnabled_: {
+ type: Boolean,
+ value: function() {
+ return loadTimeData.getBoolean('profileShortcutsEnabled');
+ },
+ readOnly: true
+ }
},
listeners: {
@@ -354,9 +375,11 @@ Polymer({
}
this.hideMessage_();
this.createInProgress_ = true;
+ var createShortcut = this.isProfileShortcutsEnabled_ &&
+ this.createShortcut_;
this.browserProxy_.createProfile(
- this.profileName_, this.profileIconUrl_, this.isSupervised_, '',
- custodianProfilePath);
+ this.profileName_, this.profileIconUrl_, createShortcut,
+ this.isSupervised_, '', custodianProfilePath);
},
/**
@@ -371,9 +394,10 @@ Polymer({
var signedInUser = event.detail.signedInUser;
this.hideMessage_();
this.createInProgress_ = true;
+ var createShortcut = this.isProfileShortcutsEnabled_;
this.browserProxy_.createProfile(
- supervisedUser.name, supervisedUser.iconURL, true, supervisedUser.id,
- signedInUser.profilePath);
+ supervisedUser.name, supervisedUser.iconURL, createShortcut,
+ true /* isSupervised */, supervisedUser.id, signedInUser.profilePath);
},
/**

Powered by Google App Engine
This is Rietveld 408576698