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

Unified Diff: net/quic/quic_data_stream.h

Issue 1423463003: Rename QuicDataStream to QuicSpdyStream. No behavior change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@105435080
Patch Set: Created 5 years, 2 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
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/quic/quic_data_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_data_stream.h
diff --git a/net/quic/quic_data_stream.h b/net/quic/quic_data_stream.h
deleted file mode 100644
index 15acc9d5acffdbe0c9dbdc8facf027306f2e3304..0000000000000000000000000000000000000000
--- a/net/quic/quic_data_stream.h
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright 2013 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.
-//
-// The base class for streams which deliver data to/from an application.
-// In each direction, the data on such a stream first contains compressed
-// headers then body data.
-
-#ifndef NET_QUIC_QUIC_DATA_STREAM_H_
-#define NET_QUIC_QUIC_DATA_STREAM_H_
-
-#include <sys/types.h>
-
-#include <list>
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/strings/string_piece.h"
-#include "net/base/iovec.h"
-#include "net/base/ip_endpoint.h"
-#include "net/base/net_export.h"
-#include "net/quic/quic_ack_notifier.h"
-#include "net/quic/quic_protocol.h"
-#include "net/quic/quic_stream_sequencer.h"
-#include "net/quic/reliable_quic_stream.h"
-#include "net/spdy/spdy_framer.h"
-
-namespace net {
-
-namespace test {
-class QuicDataStreamPeer;
-class ReliableQuicStreamPeer;
-} // namespace test
-
-class QuicSpdySession;
-
-// A QUIC data stream that can also send and receive headers.
-class NET_EXPORT_PRIVATE QuicDataStream : public ReliableQuicStream {
- public:
- // Visitor receives callbacks from the stream.
- class NET_EXPORT_PRIVATE Visitor {
- public:
- Visitor() {}
-
- // Called when the stream is closed.
- virtual void OnClose(QuicDataStream* stream) = 0;
-
- protected:
- virtual ~Visitor() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Visitor);
- };
-
- QuicDataStream(QuicStreamId id, QuicSpdySession* spdy_session);
- ~QuicDataStream() override;
-
- // ReliableQuicStream implementation
- void OnClose() override;
-
- // By default, this is the same as priority(), however it allows streams
- // to temporarily alter effective priority. For example if a SPDY stream has
- // compressed but not written headers it can write the headers with a higher
- // priority.
- QuicPriority EffectivePriority() const override;
-
- // Called by the session when decompressed headers data is received
- // for this stream.
- // May be called multiple times, with each call providing additional headers
- // data until OnStreamHeadersComplete is called.
- virtual void OnStreamHeaders(base::StringPiece headers_data);
-
- // Called by the session when headers with a priority have been received
- // for this stream. This method will only be called for server streams.
- virtual void OnStreamHeadersPriority(QuicPriority priority);
-
- // Called by the session when decompressed headers have been completely
- // delilvered to this stream. If |fin| is true, then this stream
- // should be closed; no more data will be sent by the peer.
- virtual void OnStreamHeadersComplete(bool fin, size_t frame_len);
-
- // Writes the headers contained in |header_block| to the dedicated
- // headers stream.
- virtual size_t WriteHeaders(const SpdyHeaderBlock& header_block,
- bool fin,
- QuicAckListenerInterface* ack_notifier_delegate);
-
- // Marks |bytes_consumed| of the headers data as consumed.
- void MarkHeadersConsumed(size_t bytes_consumed);
-
- // This block of functions wraps the sequencer's functions of the same
- // name. These methods return uncompressed data until that has
- // been fully processed. Then they simply delegate to the sequencer.
- virtual size_t Readv(const struct iovec* iov, size_t iov_len);
- virtual int GetReadableRegions(iovec* iov, size_t iov_len) const;
- void MarkConsumed(size_t num_bytes);
-
- // Returns true when all data has been read from the peer, including the fin.
- bool IsDoneReading() const;
- bool HasBytesToRead() const;
-
- void set_visitor(Visitor* visitor) { visitor_ = visitor; }
-
- bool headers_decompressed() const { return headers_decompressed_; }
-
- const std::string& decompressed_headers() const {
- return decompressed_headers_;
- }
-
- protected:
- // Sets priority_ to priority. This should only be called before bytes are
- // written to the server.
- void set_priority(QuicPriority priority);
- // This is protected because external classes should use EffectivePriority
- // instead.
- QuicPriority priority() const { return priority_; }
-
- bool FinishedReadingHeaders() const;
-
- private:
- friend class test::QuicDataStreamPeer;
- friend class test::ReliableQuicStreamPeer;
- friend class QuicStreamUtils;
-
- QuicSpdySession* spdy_session_;
-
- Visitor* visitor_;
- // True if the headers have been completely decompressed.
- bool headers_decompressed_;
- // The priority of the stream, once parsed.
- QuicPriority priority_;
- // Contains a copy of the decompressed headers until they are consumed
- // via ProcessData or Readv.
- std::string decompressed_headers_;
-
- DISALLOW_COPY_AND_ASSIGN(QuicDataStream);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_QUIC_DATA_STREAM_H_
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/quic/quic_data_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698