Index: chrome/installer/mac/app/AuthorizedInstall.h |
diff --git a/chrome/installer/mac/app/AuthorizedInstall.h b/chrome/installer/mac/app/AuthorizedInstall.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bd695e84141770fcd2963a4649c48859035adeb1 |
--- /dev/null |
+++ b/chrome/installer/mac/app/AuthorizedInstall.h |
@@ -0,0 +1,25 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_INSTALLER_MAC_APP_AUTHORIZEDINSTALL_H_ |
Anna Zeng
2016/08/18 15:57:16
Is there a test file for this new class? Let's add
ivanhernandez
2016/08/22 15:34:49
Will probably be on the next patch :)
|
+#define CHROME_INSTALLER_MAC_APP_AUTHORIZEDINSTALL_H_ |
+ |
+#import <Foundation/Foundation.h> |
+#import <Security/Security.h> |
+ |
+@interface AuthorizedInstall : NSObject { |
+ AuthorizationRef authRef_; |
+ OSStatus status_; |
+ FILE* communicationPipe_; |
Anna Zeng
2016/08/18 15:57:16
authRef_, status_, and communicationPipe_ can all
ivanhernandez
2016/08/22 15:34:49
Done.
|
+} |
+ |
+// Asks for user password and starts tool with privileged permissions. |
+- (BOOL)authorizeInstallationTool; |
Anna Zeng
2016/08/18 15:57:16
Can we make this the init function?
ivanhernandez
2016/08/22 15:34:49
Probably want to use a name other than init to bet
|
+ |
+// Allows this program to communicate with the child process. |
+- (void)sendMessageToTool:(NSString*)message; |
Anna Zeng
2016/08/18 15:57:16
I think the preferred API is a function that doesn
ivanhernandez
2016/08/22 15:34:49
Done.
|
+ |
+@end |
+ |
+#endif // CHROME_INSTALLER_MAC_APP_AUTHORIZEDINSTALL_H_ |