0

[WebSocket] Remove unused WebSocketChannel::PendingReceivedFrame class.

As we've removed quota control, no one use it.

Change-Id: If422b5cf8e65b4cf3d5f1acc4ce424616d1cf3a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772834
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691498}
This commit is contained in:
Yoichi Osato
2019-08-29 06:09:07 +00:00
committed by Commit Bot
parent cef551bc38
commit c2064abece
2 changed files with 0 additions and 53 deletions

@ -226,57 +226,6 @@ class WebSocketChannel::ConnectDelegate
DISALLOW_COPY_AND_ASSIGN(ConnectDelegate);
};
class WebSocketChannel::PendingReceivedFrame {
public:
PendingReceivedFrame(bool final,
WebSocketFrameHeader::OpCode opcode,
scoped_refptr<IOBuffer> data,
uint64_t offset,
uint64_t size)
: final_(final),
opcode_(opcode),
data_(std::move(data)),
offset_(offset),
size_(size) {}
PendingReceivedFrame(const PendingReceivedFrame& other) = default;
PendingReceivedFrame(PendingReceivedFrame&& other) = default;
~PendingReceivedFrame() = default;
// PendingReceivedFrame is placed in a base::queue and so needs to be copyable
// and movable.
PendingReceivedFrame& operator=(const PendingReceivedFrame& other) = default;
PendingReceivedFrame& operator=(PendingReceivedFrame&& other) = default;
bool final() const { return final_; }
WebSocketFrameHeader::OpCode opcode() const { return opcode_; }
// ResetOpcode() to Continuation.
void ResetOpcode() {
DCHECK(WebSocketFrameHeader::IsKnownDataOpCode(opcode_));
opcode_ = WebSocketFrameHeader::kOpCodeContinuation;
}
const scoped_refptr<IOBuffer>& data() const { return data_; }
uint64_t offset() const { return offset_; }
uint64_t size() const { return size_; }
// Increase |offset_| by |bytes|.
void DidConsume(uint64_t bytes) {
DCHECK_LE(offset_, size_);
DCHECK_LE(bytes, size_ - offset_);
offset_ += bytes;
}
private:
bool final_;
WebSocketFrameHeader::OpCode opcode_;
scoped_refptr<IOBuffer> data_;
// Where to start reading from data_. Everything prior to offset_ has
// already been sent to the browser.
uint64_t offset_;
// The size of data_.
uint64_t size_;
};
WebSocketChannel::WebSocketChannel(
std::unique_ptr<WebSocketEventInterface> event_interface,
URLRequestContext* url_request_context)

@ -155,8 +155,6 @@ class NET_EXPORT WebSocketChannel {
static const uint64_t kReceiveQuotaThreshold = 1 << 15;
private:
class PendingReceivedFrame;
// The object passes through a linear progression of states from
// FRESHLY_CONSTRUCTED to CLOSED, except that the SEND_CLOSED and RECV_CLOSED
// states may be skipped in case of error.