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

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

Issue 2025433002: MD User Manager: Display error message when all profiles are locked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 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
Index: chrome/browser/resources/md_user_manager/profile_browser_proxy.js
diff --git a/chrome/browser/resources/md_user_manager/profile_browser_proxy.js b/chrome/browser/resources/md_user_manager/profile_browser_proxy.js
index 2bc9630db21fd8c1627e2642f895b07115f94be9..55701d67299c5e8ddd9abbc248f62c00911c2e83 100644
--- a/chrome/browser/resources/md_user_manager/profile_browser_proxy.js
+++ b/chrome/browser/resources/md_user_manager/profile_browser_proxy.js
@@ -118,6 +118,15 @@ cr.define('signin', function() {
*/
switchToProfile: function(profilePath) {
assertNotReached();
+ },
+
+ /**
+ * Returns a Promise that is resolved if at least one (non-supervised and
+ * non-child) profile is unlocked, and is rejected otherwise.
+ * @return {Promise}
+ */
+ isAtLeastOneProfileUnlocked: function() {
dpapad 2016/05/31 19:11:59 The convention for asynchronous code behavior is t
Moe 2016/05/31 20:53:05 Makes sense. Done.
+ assertNotReached();
}
};
@@ -183,6 +192,11 @@ cr.define('signin', function() {
/** @override */
switchToProfile: function(profilePath) {
chrome.send('switchToProfile', [profilePath]);
+ },
+
+ /** @override */
+ isAtLeastOneProfileUnlocked: function() {
+ return cr.sendWithPromise('isAtLeastOneProfileUnlocked');
}
};

Powered by Google App Engine
This is Rietveld 408576698