| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef TokenizedChunkQueue_h | 5 #ifndef TokenizedChunkQueue_h |
| 6 #define TokenizedChunkQueue_h | 6 #define TokenizedChunkQueue_h |
| 7 | 7 |
| 8 #include "core/html/parser/HTMLDocumentParser.h" | 8 #include "core/html/parser/HTMLDocumentParser.h" |
| 9 #include "wtf/Deque.h" | 9 #include "wtf/Deque.h" |
| 10 #include "wtf/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 bool enqueue(std::unique_ptr<HTMLDocumentParser::TokenizedChunk>); | 34 bool enqueue(std::unique_ptr<HTMLDocumentParser::TokenizedChunk>); |
| 35 void clear(); | 35 void clear(); |
| 36 | 36 |
| 37 void takeAll(Vector<std::unique_ptr<HTMLDocumentParser::TokenizedChunk>>&); | 37 void takeAll(Vector<std::unique_ptr<HTMLDocumentParser::TokenizedChunk>>&); |
| 38 size_t peakPendingChunkCount(); | 38 size_t peakPendingChunkCount(); |
| 39 size_t peakPendingTokenCount(); | 39 size_t peakPendingTokenCount(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 TokenizedChunkQueue(); | 42 TokenizedChunkQueue(); |
| 43 | 43 |
| 44 std::unique_ptr<Mutex> m_mutex; | |
| 45 Vector<std::unique_ptr<HTMLDocumentParser::TokenizedChunk>> m_pendingChunks; | 44 Vector<std::unique_ptr<HTMLDocumentParser::TokenizedChunk>> m_pendingChunks; |
| 46 size_t m_peakPendingChunkCount = 0; | 45 size_t m_peakPendingChunkCount = 0; |
| 47 size_t m_peakPendingTokenCount = 0; | 46 size_t m_peakPendingTokenCount = 0; |
| 48 size_t m_pendingTokenCount = 0; | 47 size_t m_pendingTokenCount = 0; |
| 49 }; | 48 }; |
| 50 | 49 |
| 51 } // namespace blink | 50 } // namespace blink |
| 52 | 51 |
| 53 #endif | 52 #endif |
| OLD | NEW |