OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Use the <code>chrome.usersPrivate</code> API to manage users. |
| 6 namespace usersPrivate { |
| 7 |
| 8 callback UsersCallback = void (DOMString[] emails); |
| 9 callback UserAddedCallback = void (boolean success); |
| 10 callback IsOwnerCallback = void (boolean isOwner); |
| 11 callback ManagedCallback = void (boolean managed); |
| 12 |
| 13 interface Functions { |
| 14 // Gets a list of the canonicalized emails of the currently whitelisted |
| 15 // users. |
| 16 static void getWhitelistedUsers(UsersCallback callback); |
| 17 |
| 18 // Adds a new user with the given email to the whitelist. |
| 19 // The callback is called with true if the user was added succesfully, or |
| 20 // with false if not (e.g. because the user was already present). |
| 21 static void addWhitelistedUser(DOMString email, UserAddedCallback callback); |
| 22 |
| 23 // Removes the user with the given email from the whitelist. |
| 24 static void removeWhitelistedUser(DOMString email); |
| 25 |
| 26 // Whether the current user is the owner of the device. |
| 27 static void isCurrentUserOwner(IsOwnerCallback callback); |
| 28 |
| 29 // Whether the whitelist is managed by enterprise. |
| 30 static void isWhitelistManaged(ManagedCallback callback); |
| 31 }; |
| 32 }; |
OLD | NEW |