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

Unified Diff: third_party/WebKit/Source/platform/text/SuffixTree.h

Issue 1521923002: Make platform/text to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: third_party/WebKit/Source/platform/text/SuffixTree.h
diff --git a/third_party/WebKit/Source/platform/text/SuffixTree.h b/third_party/WebKit/Source/platform/text/SuffixTree.h
index 0b18c42a0dcf03448edb552db98a4739efe1bf46..444fe94e2d911a7cef4b63135a720750caa38a54 100644
--- a/third_party/WebKit/Source/platform/text/SuffixTree.h
+++ b/third_party/WebKit/Source/platform/text/SuffixTree.h
@@ -26,18 +26,22 @@
#ifndef SuffixTree_h
#define SuffixTree_h
+#include "wtf/Allocator.h"
+#include "wtf/Noncopyable.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
namespace blink {
class UnicodeCodebook {
+ STATIC_ONLY(UnicodeCodebook);
public:
static int codeWord(UChar c) { return c; }
enum { codeSize = 1 << 8 * sizeof(UChar) };
};
class ASCIICodebook {
+ STATIC_ONLY(ASCIICodebook);
public:
static int codeWord(UChar c) { return c & (codeSize - 1); }
enum { codeSize = 1 << (8 * sizeof(char) - 1) };
@@ -45,6 +49,8 @@ public:
template<typename Codebook>
class SuffixTree {
+ USING_FAST_MALLOC(SuffixTree);
+ WTF_MAKE_NONCOPYABLE(SuffixTree);
public:
SuffixTree(const String& text, unsigned depth)
: m_depth(depth)
@@ -67,6 +73,8 @@ public:
private:
class Node {
+ USING_FAST_MALLOC(Node);
+ WTF_MAKE_NONCOPYABLE(Node);
public:
Node(bool isLeaf = false)
{
« no previous file with comments | « third_party/WebKit/Source/platform/text/StringTruncator.h ('k') | third_party/WebKit/Source/platform/text/TabSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698