Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ | 5 #ifndef CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ |
| 6 #define CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ | 6 #define CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 @class Downloader; | 10 @class Downloader; |
| 11 @protocol DownloaderDelegate | 11 @protocol DownloaderDelegate |
| 12 - (void)didDownloadData:(double)downloadProgressPercentage; | |
| 13 - (void)downloader:(Downloader*)download | 12 - (void)downloader:(Downloader*)download |
| 14 onDownloadSuccess:(NSURL*)diskImagePath; | 13 didDownloadData:(double)downloadProgressPercentage; |
|
Sidney San Martín
2016/08/13 12:37:18
`downloader:didDownloadData:` suggests that the se
Anna Zeng
2016/08/16 23:07:39
Done.
| |
| 14 - (void)downloader:(Downloader*)download | |
| 15 onDownloadSuccessWithDiskURL:(NSURL*)diskImagePath; | |
| 15 - (void)downloader:(Downloader*)download | 16 - (void)downloader:(Downloader*)download |
| 16 onDownloadFailureWithError:(NSError*)error; | 17 onDownloadFailureWithError:(NSError*)error; |
| 17 @end | 18 @end |
| 18 | 19 |
| 19 @interface Downloader : NSObject<NSURLSessionDownloadDelegate> | 20 @interface Downloader : NSObject<NSURLSessionDownloadDelegate> |
| 20 | 21 |
| 21 @property(nonatomic, assign) id<DownloaderDelegate> delegate; | 22 @property(nonatomic, assign) id<DownloaderDelegate> delegate; |
| 22 | 23 |
| 23 // Takes an NSData with a response XML from Omaha and writes the latest | 24 // Downloads Chrome from the |chromeImageURL| to the local hard drive. |
|
Sidney San Martín
2016/08/13 12:37:18
No "the".
Anna Zeng
2016/08/16 23:07:39
Done.
| |
| 24 // version of chrome to the user's download directory. | 25 - (void)downloadChromeImageFrom:(NSURL*)chromeImageURL; |
| 25 - (void)downloadChromeImageToDownloadsDirectory:(NSURL*)chromeImageURL; | |
| 26 | |
| 27 // Returns a path to a user's home download folder. | |
| 28 + (NSString*)getChromeDownloadFilePath; | |
| 29 | 26 |
| 30 @end | 27 @end |
| 31 | 28 |
| 32 #endif // CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ | 29 #endif // CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ |
| OLD | NEW |