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

Unified Diff: chrome/installer/mac/app/AppDelegate.m

Issue 2281263003: Use AuthorizedInstall to move Chrome into place and set up permissions (Closed)
Patch Set: Edited according to updated dependency CL Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mac/app/AppDelegate.m
diff --git a/chrome/installer/mac/app/AppDelegate.m b/chrome/installer/mac/app/AppDelegate.m
index a8e956877a7b6776c00b43f3fd3dfb21f2fd94b5..2da8618dfa3b5a0898ef2d26737baa435fe40aaf 100644
--- a/chrome/installer/mac/app/AppDelegate.m
+++ b/chrome/installer/mac/app/AppDelegate.m
@@ -116,11 +116,6 @@
- (void)downloader:(Downloader*)download onSuccess:(NSURL*)diskImageURL {
[installerWindowController_ updateStatusDescription:@"Installing..."];
[installerWindowController_ enableLaunchButton];
- // TODO: Add unpacking step here and pass the path to the app bundle inside
- // the mounted disk image path to startInstall. Currently passing hardcoded
- // path to preunpacked app bundle.
- //[authorizedInstall_
- // startInstall:@"$HOME/Downloads/Google Chrome.app"];
Unpacker* unpacker = [[Unpacker alloc] init];
unpacker.delegate = self;
@@ -164,23 +159,10 @@
window_.styleMask &= ~NSClosableWindowMask;
preventTermination_ = YES;
- // TODO: move the below code into AuthorizedInstall
- NSString* chromeInApplicationsFolder = @"/Applications/Google Chromo.app";
+ NSString* chromeInApplicationsFolder =
+ [authorizedInstall_ startInstall:tempAppPath];
NSError* error = nil;
- if ([[NSFileManager defaultManager]
- fileExistsAtPath:chromeInApplicationsFolder]) {
- [[NSFileManager defaultManager] moveItemAtPath:chromeInApplicationsFolder
- toPath:tempAppPath
- error:nil];
- }
- if (![[NSFileManager defaultManager] moveItemAtPath:tempAppPath
- toPath:chromeInApplicationsFolder
- error:&error]) {
- NSLog(@"%@", error);
- }
- // TODO: move the above code into AuthorizedInstall
-
[[NSWorkspace sharedWorkspace]
launchApplicationAtURL:[NSURL fileURLWithPath:chromeInApplicationsFolder
isDirectory:NO]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698