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

Unified Diff: third_party/grpc/examples/objective-c/helloworld/main.m

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/grpc/examples/objective-c/helloworld/main.m
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h b/third_party/grpc/examples/objective-c/helloworld/main.m
similarity index 64%
copy from third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h
copy to third_party/grpc/examples/objective-c/helloworld/main.m
index 28f97ad9bcdbdf29d1b5d61f79593bd0f90b2c37..bf357990a5679c94d6058b4c9e37a3d87accb40c 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h
+++ b/third_party/grpc/examples/objective-c/helloworld/main.m
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Copyright 2015-2016, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,22 +28,32 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-#ifndef FileWriterBaseCallback_h
-#define FileWriterBaseCallback_h
+#import <UIKit/UIKit.h>
+#import "AppDelegate.h"
+
+#import <GRPCClient/GRPCCall+ChannelArg.h>
+#import <GRPCClient/GRPCCall+Tests.h>
+#import <HelloWorld/Helloworld.pbrpc.h>
-namespace blink {
+static NSString * const kHostAddress = @"localhost:50051";
-class FileWriterBase;
+int main(int argc, char * argv[]) {
+ @autoreleasepool {
+ [GRPCCall useInsecureConnectionsForHost:kHostAddress];
+ [GRPCCall setUserAgentPrefix:@"HelloWorld/1.0" forHost:kHostAddress];
-class FileWriterBaseCallback : public GarbageCollectedFinalized<FileWriterBaseCallback> {
-public:
- virtual ~FileWriterBaseCallback() { }
- DEFINE_INLINE_VIRTUAL_TRACE() { }
- virtual void handleEvent(FileWriterBase*) = 0;
-};
+ HLWGreeter *client = [[HLWGreeter alloc] initWithHost:kHostAddress];
-} // namespace blink
+ HLWHelloRequest *request = [HLWHelloRequest message];
+ request.name = @"Objective-C";
-#endif // FileWriterBaseCallback_h
+ [client sayHelloWithRequest:request handler:^(HLWHelloReply *response, NSError *error) {
+ NSLog(@"%@", response.message);
+ }];
+
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698