| Index: chrome/installer/mac/app/OmahaCommunication.m
|
| diff --git a/chrome/installer/mac/app/OmahaCommunication.m b/chrome/installer/mac/app/OmahaCommunication.m
|
| index 164d286bd12fafdfd98cffbff3fe8ac90a2cf6cd..55d23d46ab6979b7b319e9cdc41eaec9d4dd4ff1 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,9 @@ 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 onFailure:error];
|
| } else {
|
| - [delegate_ onOmahaSuccessWithURLs:completeURLs];
|
| + [delegate_ omahaCommunication:self onSuccess:completeURLs];
|
| }
|
| }] resume];
|
| }
|
|
|