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 <Foundation/Foundation.h> | |
6 #import <Cocoa/Cocoa.h> | |
Mark Mentovai
2016/07/19 21:07:40
Sort ’em! But if you’re #importing Cocoa, there’s
| |
7 | |
8 #import "Downloader.h" | |
9 #import "MainDelegate.h" | |
10 #import "OmahaCommunication.h" | |
11 #import "OmahaXMLRequest.h" | |
12 #import "SystemInfo.h" | |
13 | |
14 @implementation MainDelegate | |
15 | |
16 - (void)talkToOmaha { | |
17 NSXMLDocument* requestBody = [OmahaXMLRequest createXMLRequestBody]; | |
18 | |
19 OmahaCommunication* messenger = | |
20 [[OmahaCommunication alloc] initWithBody:requestBody]; | |
21 [messenger setDelegate:self]; | |
Sidney San Martín
2016/07/19 23:19:20
Pretty trivial: you can just say `messenger.delega
| |
22 | |
23 [messenger sendRequest]; | |
24 } | |
25 | |
26 - (void)downloadChromeWithData:(NSData*)data { | |
27 Downloader* download = [[Downloader alloc] init]; | |
28 [download setDelegate:self]; | |
Sidney San Martín
2016/07/19 23:19:20
Ditto, could be `download.delegate = self;`.
| |
29 | |
30 [download downloadChromeImageToDownloadsDirectory:data]; | |
31 } | |
32 | |
33 - (void)unpackDMG { | |
34 // TODO: replace the line of code below with real code someday | |
35 exit(0); | |
36 } | |
37 | |
38 @end | |
OLD | NEW |