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

Side by Side Diff: chrome/installer/mac/app/MainDelegate.m

Issue 2203583002: Added unpacking step (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review! 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "MainDelegate.h" 5 #import "MainDelegate.h"
6 6
7 @implementation MainDelegate 7 @implementation MainDelegate
8 8
9 - (void)runApplication { 9 - (void)runApplication {
10 OmahaCommunication* messenger = [[OmahaCommunication alloc] init]; 10 OmahaCommunication* messenger = [[OmahaCommunication alloc] init];
11 messenger.delegate = self; 11 messenger.delegate = self;
12 12
13 [messenger sendRequest]; 13 [messenger sendRequest];
14 } 14 }
15 15
16 - (void)onOmahaSuccessWithResponseBody:(NSData*)responseBody 16 - (void)onOmahaSuccessWithResponseBody:(NSData*)responseBody
17 AndError:(NSError*)error { 17 AndError:(NSError*)error {
18 if (error) { 18 if (error) {
19 NSLog(@"error: %@", [error localizedDescription]); 19 NSLog(@"error: %@", [error localizedDescription]);
20 exit(1); 20 exit(1);
21 } 21 }
22 Downloader* download = [[Downloader alloc] init]; 22 Downloader* download = [[Downloader alloc] init];
23 download.delegate = self; 23 download.delegate = self;
24 24
25 [download downloadChromeImageToDownloadsDirectory:responseBody]; 25 [download downloadChromeImageToDownloadsDirectory:responseBody];
26 } 26 }
27 27
28 - (void)onDownloadSuccess { 28 - (void)onDownloadSuccess {
29 // TODO: replace the line of code below with real code someday to unpack dmg 29 Unpacker* unpack = [[Unpacker alloc] init];
30 unpack.delegate = self;
31
32 [unpack unpackDMG];
33 }
34
35 - (void)onUnpackSuccess {
36 // TODO: replace with real code somehow
37 NSLog(@"finished unpacking");
30 exit(0); 38 exit(0);
31 } 39 }
32 40
33 - (void)onUnpackSuccess {
34 }
35
36 @end 41 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698