Index: third_party/grpc/include/grpc/support/cpu.h |
diff --git a/third_party/WebKit/public/platform/WebReferrerPolicy.h b/third_party/grpc/include/grpc/support/cpu.h |
similarity index 67% |
copy from third_party/WebKit/public/platform/WebReferrerPolicy.h |
copy to third_party/grpc/include/grpc/support/cpu.h |
index 3e58d49b92e7d9eabe8da9a00f609ef832cd0a17..3ca83b5a0d679437ba22e0883ac4f30a6458448b 100644 |
--- a/third_party/WebKit/public/platform/WebReferrerPolicy.h |
+++ b/third_party/grpc/include/grpc/support/cpu.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2011 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,24 +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 WebReferrerPolicy_h |
-#define WebReferrerPolicy_h |
+#ifndef GRPC_SUPPORT_CPU_H |
+#define GRPC_SUPPORT_CPU_H |
+ |
+#include <grpc/support/port_platform.h> |
-namespace blink { |
+#ifdef __cplusplus |
+extern "C" { |
+#endif |
+ |
+/* Interface providing CPU information for currently running system */ |
-enum WebReferrerPolicy { |
- WebReferrerPolicyAlways, |
- WebReferrerPolicyDefault, |
- WebReferrerPolicyNoReferrerWhenDowngrade, |
- WebReferrerPolicyNever, |
- WebReferrerPolicyOrigin, |
- WebReferrerPolicyOriginWhenCrossOrigin, |
- WebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin, |
- WebReferrerPolicyLast = WebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin |
-}; |
+/* Return the number of CPU cores on the current system. Will return 0 if |
+ the information is not available. */ |
+GPRAPI unsigned gpr_cpu_num_cores(void); |
-} // namespace blink |
+/* Return the CPU on which the current thread is executing; N.B. This should |
+ be considered advisory only - it is possible that the thread is switched |
+ to a different CPU at any time. Returns a value in range |
+ [0, gpr_cpu_num_cores() - 1] */ |
+GPRAPI unsigned gpr_cpu_current_cpu(void); |
+#ifdef __cplusplus |
+} // extern "C" |
#endif |
+ |
+#endif /* GRPC_SUPPORT_CPU_H */ |