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

Unified Diff: sky/engine/platform/heap/HeapTerminatedArray.h

Issue 678003003: Begin to remove heap/* (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/platform/heap/Heap.cpp ('k') | sky/engine/platform/heap/HeapTerminatedArrayBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/heap/HeapTerminatedArray.h
diff --git a/sky/engine/platform/heap/HeapTerminatedArray.h b/sky/engine/platform/heap/HeapTerminatedArray.h
deleted file mode 100644
index de1cd4649b94b433fb7e3354e9d71446fd491950..0000000000000000000000000000000000000000
--- a/sky/engine/platform/heap/HeapTerminatedArray.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef HeapTerminatedArray_h
-#define HeapTerminatedArray_h
-
-#include "platform/heap/Heap.h"
-#include "wtf/TerminatedArray.h"
-#include "wtf/TerminatedArrayBuilder.h"
-
-namespace blink {
-
-template<typename T>
-class HeapTerminatedArray : public TerminatedArray<T> {
- DISALLOW_ALLOCATION();
-public:
- using TerminatedArray<T>::begin;
- using TerminatedArray<T>::end;
-
- void trace(Visitor* visitor)
- {
- for (typename TerminatedArray<T>::iterator it = begin(); it != end(); ++it)
- visitor->trace(*it);
- }
-
-private:
- // Allocator describes how HeapTerminatedArrayBuilder should create new intances
- // of TerminateArray and manage their lifetimes.
- struct Allocator {
- typedef HeapTerminatedArray* PassPtr;
- typedef RawPtr<HeapTerminatedArray> Ptr;
-
- static PassPtr create(size_t capacity)
- {
- return reinterpret_cast<HeapTerminatedArray*>(Heap::allocate<HeapTerminatedArray>(capacity * sizeof(T)));
- }
-
- static PassPtr resize(PassPtr ptr, size_t capacity)
- {
- return reinterpret_cast<HeapTerminatedArray*>(Heap::reallocate<HeapTerminatedArray>(ptr, capacity * sizeof(T)));
- }
- };
-
- // Prohibit construction. Allocator makes HeapTerminatedArray instances for
- // HeapTerminatedArrayBuilder by pointer casting.
- HeapTerminatedArray();
-
- template<typename U, template <typename> class> friend class WTF::TerminatedArrayBuilder;
-};
-
-} // namespace blink
-
-#endif // HeapTerminatedArray_h
« no previous file with comments | « sky/engine/platform/heap/Heap.cpp ('k') | sky/engine/platform/heap/HeapTerminatedArrayBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698