Index: chrome/installer/mac/app/downloader.h |
diff --git a/chrome/installer/mac/app/downloader.h b/chrome/installer/mac/app/downloader.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..085e5e3a0f21a0d984100515b50708ba675d37ae |
--- /dev/null |
+++ b/chrome/installer/mac/app/downloader.h |
@@ -0,0 +1,27 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ |
+#define CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ |
+ |
+#import <Foundation/Foundation.h> |
+ |
+@interface Downloader : NSObject <NSXMLParserDelegate> |
+ |
+// Calls parseXML and returns the first URL. Then calls appendFilename to form |
Elly Fong-Jones
2016/07/06 15:22:02
Comments in headers should be about the interface
|
+// complete download URLs. |
+// TODO(ivan): check the URL's actually work ie. response is a 200/202 and |
Elly Fong-Jones
2016/07/06 15:22:02
TODOs should have your username in them, so this w
|
+// return the first working URL. |
+- (NSURL*)parseOhamaResponseForChromeImageURLAndFilename:(NSData*)omahaResponseXML; |
+ |
+// Writes the chrome image in memory to the user's download directory. |
+- (void)writeChromeImageToDownloadsDirectory:(NSURL*)chromeURL; |
+ |
+// Calls all the other methods in this class to download the latest version of |
+// chrome. |
+- (void)downloadChromeImageToDownloadsDirectory:(NSData*)responseXMLData; |
Elly Fong-Jones
2016/07/06 15:22:02
I think this is the only function that should real
|
+ |
+@end |
+ |
+#endif // CHROME_INSTALLER_MAC_APP_DOWNLOADER_H_ |