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

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

Issue 2094583004: Initial commit for Chrome metainstaller on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fully addressed making the .dmg download asynchronously Created 4 years, 6 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.h
diff --git a/chrome/installer/mac/app/OmahaCommunication.h b/chrome/installer/mac/app/OmahaCommunication.h
new file mode 100644
index 0000000000000000000000000000000000000000..53a36657ae728ef9efc87b472139e3dc81cde0cb
--- /dev/null
+++ b/chrome/installer/mac/app/OmahaCommunication.h
@@ -0,0 +1,33 @@
+// 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_OMAHACOMMUNICATION_H_
+#define CHROME_INSTALLER_MAC_APP_OMAHACOMMUNICATION_H_
+
+#import <Foundation/Foundation.h>
+#include "NetworkCommunication.h"
+
+typedef void (^AfterBlock)(NSData*);
Elly Fong-Jones 2016/07/06 15:22:01 OmahaRequestCompletionHandler?
+
+@interface OmahaCommunication : NSObject
+
+@property(nonatomic, copy) NSXMLDocument* requestXMLBody;
+@property(nonatomic, copy) NetworkCommunication* sessionHelper;
+
+- (id)init;
+- (id)initWithBody:(NSXMLDocument*) xmlBody;
+
+// Creates a new HTTP URL request to Omaha using the NetworkCommunication helper
+// and adjusts the URLRequest by changing the HTTP Method to "POST", which is
Elly Fong-Jones 2016/07/06 15:22:01 This is an implementation detail. Also, is there a
Anna Zeng 2016/07/07 15:24:53 no, but it's a good idea to be able to verify if t
+// required to not get an error message.
+- (NSURLRequest*)createOmahaRequest;
+// Set how to respond to a response, including error handling and kicking off
+// the next block of code to run after the asynchronous jump.
Elly Fong-Jones 2016/07/06 15:22:01 what asynchronous jump? This is setting the comple
+- (void)setResponseHandlingWithBlock:(AfterBlock) block;
+// Sends the request created using the session helper.
+- (void)sendRequest;
Elly Fong-Jones 2016/07/06 15:22:01 I would do sendRequestWithCompletionHandler: or so
+
+@end
+
+#endif // CHROME_INSTALLER_MAC_APP_OMAHACOMMUNICATION_H_

Powered by Google App Engine
This is Rietveld 408576698