OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "MainDelegate.h" |
| 6 |
| 7 @implementation MainDelegate |
| 8 |
| 9 - (void)runApplication { |
| 10 OmahaCommunication* messenger = [[OmahaCommunication alloc] init]; |
| 11 messenger.delegate = self; |
| 12 |
| 13 [messenger sendRequest]; |
| 14 } |
| 15 |
| 16 - (void)onOmahaSuccessWithData:(NSData*)data { |
| 17 Downloader* download = [[Downloader alloc] init]; |
| 18 download.delegate = self; |
| 19 |
| 20 [download downloadChromeImageToDownloadsDirectory:data]; |
| 21 } |
| 22 |
| 23 - (void)onDownloadSuccess { |
| 24 // TODO: replace the line of code below with real code someday to unpack dmg |
| 25 exit(0); |
| 26 } |
| 27 |
| 28 @end |
OLD | NEW |