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

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

Issue 2148293005: Migrate mac installer to delegate-driven model (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last patch before CQ Created 4 years, 5 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 | « chrome/installer/mac/app/OmahaXMLRequest.m ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5dfad4c8645dfe48b5805b08bba57758fb4cb1bf 100644
--- a/chrome/installer/mac/app/main.m
+++ b/chrome/installer/mac/app/main.m
@@ -4,31 +4,12 @@
#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];
return 1;
}
« no previous file with comments | « chrome/installer/mac/app/OmahaXMLRequest.m ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698