Chromium Code Reviews| Index: chrome/installer/mac/app/main.m |
| diff --git a/chrome/installer/mac/app/main.m b/chrome/installer/mac/app/main.m |
| index 3f718136da58412eba1d290a526b7b9d7943aa83..2f61738aafa009df5fd2bdf885e5eb3d9957e354 100644 |
| --- a/chrome/installer/mac/app/main.m |
| +++ b/chrome/installer/mac/app/main.m |
| @@ -4,31 +4,14 @@ |
| #import <Foundation/Foundation.h> |
| -#import "Downloader.h" |
| -#import "OmahaCommunication.h" |
| -#import "OmahaXMLRequest.h" |
| -#import "SystemInfo.h" |
| +#import "MainDelegate.h" |
| -// TODO: add a class that takes care of what main is doing now |
| -void talkToOmahaThenExecuteBlock(OmahaRequestCompletionHandler block) { |
| - NSXMLDocument* requestBody = [OmahaXMLRequest createXMLRequestBody]; |
| - OmahaCommunication* messenger = |
| - [[OmahaCommunication alloc] initWithBody:requestBody]; |
| - [messenger sendRequestWithBlock:block]; |
| -} |
| - |
| -int main() { |
| - talkToOmahaThenExecuteBlock(^(NSData* data, NSError* error) { |
| - if (error) { |
| - NSLog(@"%@", [error localizedDescription]); |
| - return; |
| - } |
| - Downloader* download = [[Downloader alloc] init]; |
| - [download downloadChromeImageToDownloadsDirectory:data]; |
| - }); |
| +int main(int argc, const char* argv[]) { |
| + MainDelegate* delegate = [[MainDelegate alloc] init]; |
| + [delegate runApplication]; |
| - // [[NSRunLoop mainRunLoop] run]; |
| - [[NSRunLoop mainRunLoop] |
| - runUntilDate:[NSDate dateWithTimeIntervalSinceNow:3]]; |
| + [[NSRunLoop mainRunLoop] run]; |
| + // [[NSRunLoop mainRunLoop] |
| + // runUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]]; |
|
Sidney San Martín
2016/07/22 02:30:17
Maybe delete this, instead of leaving it commented
|
| return 1; |
| } |