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

Unified Diff: base/mac/authorization_util.h

Issue 28713002: [Mac] Add option to reauthenticate the OS user before revealing passwords. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rerebase. Created 7 years, 2 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 | base/mac/authorization_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/authorization_util.h
diff --git a/base/mac/authorization_util.h b/base/mac/authorization_util.h
index b34348d175d7073611dfc1d9fbf4c4f35e7d2355..4629039c4107eeb9d591c01ddfe033655df19d3c 100644
--- a/base/mac/authorization_util.h
+++ b/base/mac/authorization_util.h
@@ -33,11 +33,20 @@
namespace base {
namespace mac {
-// Obtains an AuthorizationRef that can be used to run commands as root. If
-// necessary, prompts the user for authentication. If the user is prompted,
+// Obtains an AuthorizationRef for the rights indicated by |rights|. If
+// necessary, prompts the user for authentication. If the user is prompted,
// |prompt| will be used as the prompt string and an icon appropriate for the
-// application will be displayed in a prompt dialog. Note that the system
-// appends its own text to the prompt string. Returns NULL on failure.
+// application will be displayed in a prompt dialog. Note that the system
+// appends its own text to the prompt string. |extraFlags| will be ORed
+// together with the default flags. Returns NULL on failure.
+BASE_EXPORT
+AuthorizationRef GetAuthorizationRightsWithPrompt(
+ AuthorizationRights* rights,
+ CFStringRef prompt,
+ AuthorizationFlags extraFlags);
+
+// Obtains an AuthorizationRef (using |GetAuthorizationRightsWithPrompt|) that
+// can be used to run commands as root.
BASE_EXPORT
AuthorizationRef AuthorizationCreateToRunAsRoot(CFStringRef prompt);
« no previous file with comments | « no previous file | base/mac/authorization_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698