| Index: net/http/http_pipelined_stream.h
|
| diff --git a/net/http/http_basic_stream.h b/net/http/http_pipelined_stream.h
|
| similarity index 64%
|
| copy from net/http/http_basic_stream.h
|
| copy to net/http/http_pipelined_stream.h
|
| index 303d68f28bed4a5485c7620b11a0dea433688f4c..0db1525077c7e79e852a6ee514f01cefcc2be557 100644
|
| --- a/net/http/http_basic_stream.h
|
| +++ b/net/http/http_pipelined_stream.h
|
| @@ -1,13 +1,9 @@
|
| // Copyright (c) 2011 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.
|
| -//
|
| -// HttpBasicStream is a simple implementation of HttpStream. It assumes it is
|
| -// not sharing a sharing with any other HttpStreams, therefore it just reads and
|
| -// writes directly to the Http Stream.
|
|
|
| -#ifndef NET_HTTP_HTTP_BASIC_STREAM_H_
|
| -#define NET_HTTP_HTTP_BASIC_STREAM_H_
|
| +#ifndef NET_HTTP_HTTP_PIPELINED_STREAM_H_
|
| +#define NET_HTTP_HTTP_PIPELINED_STREAM_H_
|
| #pragma once
|
|
|
| #include <string>
|
| @@ -19,25 +15,26 @@
|
| namespace net {
|
|
|
| class BoundNetLog;
|
| -class ClientSocketHandle;
|
| -class GrowableIOBuffer;
|
| +class HttpPipelinedConnectionImpl;
|
| class HttpResponseInfo;
|
| -struct HttpRequestInfo;
|
| class HttpRequestHeaders;
|
| +struct HttpRequestInfo;
|
| class HttpStreamParser;
|
| class IOBuffer;
|
| class UploadDataStream;
|
|
|
| -class HttpBasicStream : public HttpStream {
|
| +// HttpPipelinedStream is the pipelined implementation of HttpStream. It has
|
| +// very little code in it. Instead, it serves as the client's interface to the
|
| +// pipelined connection, where all the work happens.
|
| +//
|
| +// In the case of pipelining failures, these functions may return
|
| +// ERR_PIPELINE_EVICTION. In that case, the client should retry the HTTP
|
| +// request without pipelining.
|
| +class HttpPipelinedStream : public HttpStream {
|
| public:
|
| - // Constructs a new HttpBasicStream. If |parser| is NULL, then
|
| - // InitializeStream should be called to initialize it correctly. If
|
| - // |parser| is non-null, then InitializeStream should not be called,
|
| - // as the stream is already initialized.
|
| - HttpBasicStream(ClientSocketHandle* connection,
|
| - HttpStreamParser* parser,
|
| - bool using_proxy);
|
| - virtual ~HttpBasicStream();
|
| + HttpPipelinedStream(HttpPipelinedConnectionImpl* pipeline,
|
| + int pipeline_id);
|
| + virtual ~HttpPipelinedStream();
|
|
|
| // HttpStream methods:
|
| virtual int InitializeStream(const HttpRequestInfo* request_info,
|
| @@ -83,26 +80,18 @@ class HttpBasicStream : public HttpStream {
|
|
|
| virtual void LogNumRttVsBytesMetrics() const OVERRIDE;
|
|
|
| - private:
|
| - scoped_refptr<GrowableIOBuffer> read_buf_;
|
| -
|
| - scoped_ptr<HttpStreamParser> parser_;
|
| -
|
| - scoped_ptr<ClientSocketHandle> connection_;
|
| + virtual void Drain(HttpNetworkSession* session) OVERRIDE;
|
|
|
| - bool using_proxy_;
|
| + private:
|
| + HttpPipelinedConnectionImpl* pipeline_;
|
|
|
| - std::string request_line_;
|
| + int pipeline_id_;
|
|
|
| const HttpRequestInfo* request_info_;
|
|
|
| - const HttpResponseInfo* response_;
|
| -
|
| - int64 bytes_read_offset_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(HttpBasicStream);
|
| + DISALLOW_COPY_AND_ASSIGN(HttpPipelinedStream);
|
| };
|
|
|
| } // namespace net
|
|
|
| -#endif // NET_HTTP_HTTP_BASIC_STREAM_H_
|
| +#endif // NET_HTTP_HTTP_PIPELINED_STREAM_H_
|
|
|