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

Unified Diff: chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js

Issue 2525783002: MD Settings: Hide Profile Shortcut switch for single-profile machines. (Closed)
Patch Set: one more fix to make it actually work 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/settings/people_page/manage_profile_browser_proxy.js
diff --git a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js
index 0a96f0ec36cb6217429e4a735e6f2b3d2b310795..78bcb39586b5239459c27898b7e5781ee780a935 100644
--- a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js
+++ b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js
@@ -6,6 +6,18 @@
* @fileoverview A helper object used from the "Manage Profile" subpage of
* the People section to interact with the browser. Chrome Browser only.
*/
+
+/**
+ * Contains the possible profile shortcut statuses. These strings must be kept
+ * in sync with the C++ Manage Profile handler.
+ * @enum {string}
+ */
+var ProfileShortcutStatus = {
+ PROFILE_SHORTCUT_SETTING_HIDDEN: 'profileShortcutSettingHidden',
+ PROFILE_SHORTCUT_NOT_FOUND: 'profileShortcutNotFound',
+ PROFILE_SHORTCUT_FOUND: 'profileShortcutFound',
+};
+
cr.define('settings', function() {
/** @interface */
function ManageProfileBrowserProxy() {}
@@ -26,9 +38,9 @@ cr.define('settings', function() {
/**
* Returns whether the current profile has a shortcut.
- * @return {!Promise<boolean>}
+ * @return {!Promise<ProfileShortcutStatus>}
*/
- getHasProfileShortcut: function() {},
+ getProfileShortcutStatus: function() {},
/**
* Adds a shortcut for the current profile.
@@ -62,8 +74,8 @@ cr.define('settings', function() {
},
/** @override */
- getHasProfileShortcut: function() {
- return cr.sendWithPromise('requestHasProfileShortcuts');
+ getProfileShortcutStatus: function() {
+ return cr.sendWithPromise('requestProfileShortcutStatus');
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698