Index: third_party/grpc/src/core/transport/chttp2/http2_errors.h |
diff --git a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h b/third_party/grpc/src/core/transport/chttp2/http2_errors.h |
similarity index 63% |
copy from third_party/tcmalloc/vendor/src/base/synchronization_profiling.h |
copy to third_party/grpc/src/core/transport/chttp2/http2_errors.h |
index cf02c218a111806189f71f7b528a83b5ceb164a4..a4f309e0565d40ed251f2c799ccb4d1b02d5ecb4 100644 |
--- a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h |
+++ b/third_party/grpc/src/core/transport/chttp2/http2_errors.h |
@@ -1,4 +1,6 @@ |
-/* Copyright (c) 2010, Google Inc. |
+/* |
+ * |
+ * Copyright 2015, Google Inc. |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
@@ -27,24 +29,28 @@ |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
- * --- |
- * Author: Chris Ruemmler |
*/ |
-#ifndef BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_ |
-#define BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_ |
- |
-#include "base/basictypes.h" |
- |
-namespace base { |
+#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H |
+#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H |
-// We can do contention-profiling of SpinLocks, but the code is in |
-// mutex.cc, which is not always linked in with spinlock. Hence we |
-// provide a weak definition, which are used if mutex.cc isn't linked in. |
+/* error codes for RST_STREAM from http2 draft 14 section 7 */ |
+typedef enum { |
+ GRPC_CHTTP2_NO_ERROR = 0x0, |
+ GRPC_CHTTP2_PROTOCOL_ERROR = 0x1, |
+ GRPC_CHTTP2_INTERNAL_ERROR = 0x2, |
+ GRPC_CHTTP2_FLOW_CONTROL_ERROR = 0x3, |
+ GRPC_CHTTP2_SETTINGS_TIMEOUT = 0x4, |
+ GRPC_CHTTP2_STREAM_CLOSED = 0x5, |
+ GRPC_CHTTP2_FRAME_SIZE_ERROR = 0x6, |
+ GRPC_CHTTP2_REFUSED_STREAM = 0x7, |
+ GRPC_CHTTP2_CANCEL = 0x8, |
+ GRPC_CHTTP2_COMPRESSION_ERROR = 0x9, |
+ GRPC_CHTTP2_CONNECT_ERROR = 0xa, |
+ GRPC_CHTTP2_ENHANCE_YOUR_CALM = 0xb, |
+ GRPC_CHTTP2_INADEQUATE_SECURITY = 0xc, |
+ /* force use of a default clause */ |
+ GRPC_CHTTP2__ERROR_DO_NOT_USE = -1 |
+} grpc_chttp2_error_code; |
-// Submit the number of cycles the spinlock spent contending. |
-ATTRIBUTE_WEAK extern void SubmitSpinLockProfileData(const void *, int64); |
-extern void SubmitSpinLockProfileData(const void *contendedlock, |
- int64 wait_cycles) {} |
-} |
-#endif // BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_ |
+#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H */ |