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

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

Issue 2203583002: Added unpacking step (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added use of temporary folders, removed semaphore from main installer code, adjusted some files' APIs, resolved remaining comments Created 4 years, 4 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/OmahaCommunication.m
diff --git a/chrome/installer/mac/app/OmahaCommunication.m b/chrome/installer/mac/app/OmahaCommunication.m
index 9f1d8cb3e68392c02145f9e5819b17f2d564fad5..5315ff212bb82fe9a09485c8cf2e1a61e7051752 100644
--- a/chrome/installer/mac/app/OmahaCommunication.m
+++ b/chrome/installer/mac/app/OmahaCommunication.m
@@ -7,6 +7,7 @@
#import "OmahaXMLRequest.h"
#import "OmahaXMLParser.h"
+// TODO: turn this string to a command-line flag
static NSString* const omahaURLPath =
@"https://tools.google.com/service/update2";
@@ -35,7 +36,7 @@ static NSString* const omahaURLPath =
}
- (void)fetchDownloadURLs {
- // TODO: turn this string to a command-line flag
+ // Forming the request
NSURL* requestURL = [NSURL URLWithString:omahaURLPath];
NSMutableURLRequest* request =
[NSMutableURLRequest requestWithURL:requestURL];
@@ -44,6 +45,7 @@ static NSString* const omahaURLPath =
[[requestXMLBody_ XMLString] dataUsingEncoding:NSUTF8StringEncoding];
request.HTTPBody = requestBody;
request.HTTPMethod = @"POST";
+ // Sending the request
[[[NSURLSession sharedSession]
dataTaskWithRequest:request
completionHandler:^(NSData* data, NSURLResponse* response,
@@ -56,9 +58,10 @@ static NSString* const omahaURLPath =
// parsing error, as the user only needs to know there was a problem
// talking with the Google Update server.
if (error) {
- [delegate_ onOmahaFailureWithError:error];
+ [delegate_ omahaCommunication:self onOmahaFailureWithError:error];
} else {
- [delegate_ onOmahaSuccessWithURLs:completeURLs];
+ [delegate_ omahaCommunication:self
+ onOmahaSuccessWithURLs:completeURLs];
}
}] resume];
}

Powered by Google App Engine
This is Rietveld 408576698