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

Unified Diff: third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.h

Issue 2181943002: Rename ParsedChunk to TokenizedChunk in core/html/parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.h
diff --git a/third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.h b/third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.h
deleted file mode 100644
index bfa964b1ddc741938f37ec51684e7df6e3ba02b3..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2015 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 ParsedChunkQueue_h
-#define ParsedChunkQueue_h
-
-#include "core/html/parser/HTMLDocumentParser.h"
-#include "wtf/Deque.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/ThreadSafeRefCounted.h"
-#include "wtf/ThreadingPrimitives.h"
-#include "wtf/Vector.h"
-#include <memory>
-
-namespace blink {
-
-// ParsedChunkQueue is used to transfer parsed HTML token chunks
-// from BackgroundHTMLParser thread to Blink main thread without
-// spamming task queue.
-// ParsedChunkQueue is accessed from both BackgroundHTMLParser
-// thread (producer) and Blink main thread (consumer).
-// Access to the backend queue vector is protected by a mutex.
-// If enqueue is done against empty queue, BackgroundHTMLParser
-// thread kicks a consumer task on Blink main thread.
-class ParsedChunkQueue : public ThreadSafeRefCounted<ParsedChunkQueue> {
-public:
- static PassRefPtr<ParsedChunkQueue> create()
- {
- return adoptRef(new ParsedChunkQueue);
- }
-
- ~ParsedChunkQueue();
-
- bool enqueue(std::unique_ptr<HTMLDocumentParser::ParsedChunk>);
- void clear();
-
- void takeAll(Vector<std::unique_ptr<HTMLDocumentParser::ParsedChunk>>&);
- size_t peakPendingChunkCount();
- size_t peakPendingTokenCount();
-
-private:
- ParsedChunkQueue();
-
- std::unique_ptr<Mutex> m_mutex;
- Vector<std::unique_ptr<HTMLDocumentParser::ParsedChunk>> m_pendingChunks;
- size_t m_peakPendingChunkCount = 0;
- size_t m_peakPendingTokenCount = 0;
- size_t m_pendingTokenCount = 0;
-};
-
-} // namespace blink
-
-#endif

Powered by Google App Engine
This is Rietveld 408576698