Commit 5c5d0576 authored by olli.raula's avatar olli.raula Committed by Commit bot

Remove ScopedVector from spdy_stream

BUG=554289

Review URL: https://codereview.chromium.org/1459973003

Cr-Commit-Position: refs/heads/master@{#361077}
parent 8fbcba14
......@@ -178,8 +178,8 @@ void SpdyStream::PushedStreamReplay() {
while (!pending_recv_data_.empty()) {
// Take ownership of the first element of |pending_recv_data_|.
scoped_ptr<SpdyBuffer> buffer(pending_recv_data_.front());
pending_recv_data_.weak_erase(pending_recv_data_.begin());
scoped_ptr<SpdyBuffer> buffer = std::move(pending_recv_data_.at(0));
pending_recv_data_.erase(pending_recv_data_.begin());
bool eof = (buffer == NULL);
......@@ -484,7 +484,7 @@ void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
// It should be valid for this to happen in the server push case.
// We'll return received data when delegate gets attached to the stream.
if (buffer) {
pending_recv_data_.push_back(buffer.Pass());
pending_recv_data_.push_back(std::move(buffer));
} else {
pending_recv_data_.push_back(NULL);
// Note: we leave the stream open in the session until the stream
......
......@@ -14,7 +14,6 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "net/base/io_buffer.h"
#include "net/base/net_export.h"
......@@ -547,7 +546,7 @@ class NET_EXPORT_PRIVATE SpdyStream {
// after the data is fully read. Specifically, data received before the
// delegate is attached must be buffered and later replayed. A remote FIN
// is represented by a final, zero-length buffer.
ScopedVector<SpdyBuffer> pending_recv_data_;
std::vector<scoped_ptr<SpdyBuffer>> pending_recv_data_;
// The time at which the request was made that resulted in this response.
// For cached responses, this time could be "far" in the past.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment