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

Unified Diff: chrome/installer/mac/app/OmahaCommunication.h

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/NetworkCommunication.m ('k') | chrome/installer/mac/app/OmahaCommunication.m » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mac/app/OmahaCommunication.h
diff --git a/chrome/installer/mac/app/OmahaCommunication.h b/chrome/installer/mac/app/OmahaCommunication.h
index 54a377f1c8361e71252c7dd8680436e0264ae8ca..5bfae676b25c2650bd5331934e16a30cf4a746f4 100644
--- a/chrome/installer/mac/app/OmahaCommunication.h
+++ b/chrome/installer/mac/app/OmahaCommunication.h
@@ -7,20 +7,27 @@
#import <Foundation/Foundation.h>
-#include "NetworkCommunication.h"
+#import "NetworkCommunication.h"
-typedef void (^OmahaRequestCompletionHandler)(NSData*, NSError*);
+@protocol OmahaCommunicationDelegate
+- (void)onOmahaSuccessWithResponseBody:(NSData*)responseBody
+ AndError:(NSError*)error;
+@end
-@interface OmahaCommunication : NSObject
+@interface OmahaCommunication : NSObject<NSURLSessionDataDelegate> {
+ id<OmahaCommunicationDelegate> _delegate;
+}
@property(nonatomic, copy) NSXMLDocument* requestXMLBody;
+// TODO: talk to @sdy about use of NetworkCommunication
@property(nonatomic, copy) NetworkCommunication* sessionHelper;
+@property(nonatomic, assign) id<OmahaCommunicationDelegate> delegate;
- (id)init;
- (id)initWithBody:(NSXMLDocument*)xmlBody;
// Sends the request created using the session helper.
-- (void)sendRequestWithBlock:(OmahaRequestCompletionHandler)block;
+- (void)sendRequest;
@end
« no previous file with comments | « chrome/installer/mac/app/NetworkCommunication.m ('k') | chrome/installer/mac/app/OmahaCommunication.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698