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

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

Issue 2148293005: Migrate mac installer to delegate-driven model (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed the rest of Sidney's comments 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
Index: chrome/installer/mac/app/NetworkCommunication.m
diff --git a/chrome/installer/mac/app/NetworkCommunication.m b/chrome/installer/mac/app/NetworkCommunication.m
index d19566a1e0188cd7a0d61bbbd0f09abc39275e02..f7bd7304d63884e4d6ba395da0b8516a8d574a92 100644
--- a/chrome/installer/mac/app/NetworkCommunication.m
+++ b/chrome/installer/mac/app/NetworkCommunication.m
@@ -10,8 +10,6 @@
@synthesize session = session_;
@synthesize request = request_;
-@synthesize dataResponseHandler = dataResponseHandler_;
-@synthesize downloadResponseHandler = downloadResponseHandler_;
- (id)init {
return [self initWithDelegate:nil];
@@ -41,24 +39,14 @@
return request_;
}
-- (void)sendDataRequestWithCompletionHandler:
- (DataTaskCompletionHandler)completionHandler {
- dataResponseHandler_ = completionHandler;
- NSURLSessionDataTask* dataTask =
- [session_ dataTaskWithRequest:request_
- completionHandler:dataResponseHandler_];
-
+- (void)sendDataRequest {
+ NSURLSessionDataTask* dataTask = [session_ dataTaskWithRequest:request_];
[dataTask resume];
}
- (void)sendDownloadRequest {
- NSURLSessionDownloadTask* downloadTask;
- if (downloadResponseHandler_) {
- downloadTask = [session_ downloadTaskWithRequest:request_
- completionHandler:downloadResponseHandler_];
- } else {
- downloadTask = [session_ downloadTaskWithRequest:request_];
- }
+ NSURLSessionDownloadTask* downloadTask =
+ [session_ downloadTaskWithRequest:request_];
[downloadTask resume];
}

Powered by Google App Engine
This is Rietveld 408576698