aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-03-22 14:30:16 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-03-22 14:30:16 -0700
commitc2e53b5af4830c14d5cda72bba20df2855789300 (patch)
treec70183b10ec1a009269719df6ced9ccb6c1b0c62 /src/objective-c/GRPCClient/private
parent9f74e838e2cfdba10176e9fda3baa3dfe45a5ac0 (diff)
Addressed the comments
Diffstat (limited to 'src/objective-c/GRPCClient/private')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCOpBatchLog.h5
-rw-r--r--src/objective-c/GRPCClient/private/GRPCOpBatchLog.m10
2 files changed, 12 insertions, 3 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCOpBatchLog.h b/src/objective-c/GRPCClient/private/GRPCOpBatchLog.h
index dbc3417acf..753c4cfee6 100644
--- a/src/objective-c/GRPCClient/private/GRPCOpBatchLog.h
+++ b/src/objective-c/GRPCClient/private/GRPCOpBatchLog.h
@@ -31,6 +31,9 @@
*
*/
+
+#ifdef GRPC_TEST_OBJC
+
/**
* Logs the op batches of a client. Used for testing.
*/
@@ -52,3 +55,5 @@
+ (NSArray *)obtainAndCleanOpBatchLog;
@end
+
+#endif
diff --git a/src/objective-c/GRPCClient/private/GRPCOpBatchLog.m b/src/objective-c/GRPCClient/private/GRPCOpBatchLog.m
index c172c3c988..4b40baf122 100644
--- a/src/objective-c/GRPCClient/private/GRPCOpBatchLog.m
+++ b/src/objective-c/GRPCClient/private/GRPCOpBatchLog.m
@@ -31,11 +31,13 @@
*
*/
+#ifdef GRPC_TEST_OBJC
+
#import "GRPCOpBatchLog.h"
-@implementation GRPCOpBatchLog
+static NSMutableArray *opBatchLog = nil;
-NSMutableArray *opBatchLog = nil;
+@implementation GRPCOpBatchLog
+ (void)enableOpBatchLog:(BOOL)enabled {
@synchronized (opBatchLog) {
@@ -65,4 +67,6 @@ NSMutableArray *opBatchLog = nil;
}
}
-@end \ No newline at end of file
+@end
+
+#endif