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

Unified Diff: third_party/grpc/src/core/iomgr/timer_heap.h

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
« no previous file with comments | « third_party/grpc/src/core/iomgr/timer.c ('k') | third_party/grpc/src/core/iomgr/timer_heap.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/src/core/iomgr/timer_heap.h
diff --git a/third_party/WebKit/Source/core/svg/SVGUnitTypes.cpp b/third_party/grpc/src/core/iomgr/timer_heap.h
similarity index 67%
copy from third_party/WebKit/Source/core/svg/SVGUnitTypes.cpp
copy to third_party/grpc/src/core/iomgr/timer_heap.h
index 2d778fa0346b212190a11bde15b290175118b386..2d220f16774e7af149ca7c06471ede00eb8e5666 100644
--- a/third_party/WebKit/Source/core/svg/SVGUnitTypes.cpp
+++ b/third_party/grpc/src/core/iomgr/timer_heap.h
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2014 Google Inc. All rights reserved.
+ *
+ * Copyright 2015, 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,20 +28,30 @@
* 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.
+ *
*/
-#include "core/svg/SVGUnitTypes.h"
+#ifndef GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H
+#define GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H
+
+#include "src/core/iomgr/timer.h"
+
+typedef struct {
+ grpc_timer **timers;
+ uint32_t timer_count;
+ uint32_t timer_capacity;
+} grpc_timer_heap;
+
+/* return 1 if the new timer is the first timer in the heap */
+int grpc_timer_heap_add(grpc_timer_heap *heap, grpc_timer *timer);
+
+void grpc_timer_heap_init(grpc_timer_heap *heap);
+void grpc_timer_heap_destroy(grpc_timer_heap *heap);
-namespace blink {
+void grpc_timer_heap_remove(grpc_timer_heap *heap, grpc_timer *timer);
+grpc_timer *grpc_timer_heap_top(grpc_timer_heap *heap);
+void grpc_timer_heap_pop(grpc_timer_heap *heap);
-template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGUnitTypes::SVGUnitType>()
-{
- DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ());
- if (entries.isEmpty()) {
- entries.append(std::make_pair(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE, "userSpaceOnUse"));
- entries.append(std::make_pair(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, "objectBoundingBox"));
- }
- return entries;
-}
+int grpc_timer_heap_is_empty(grpc_timer_heap *heap);
-} // namespace blink
+#endif /* GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H */
« no previous file with comments | « third_party/grpc/src/core/iomgr/timer.c ('k') | third_party/grpc/src/core/iomgr/timer_heap.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698