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

Unified Diff: net/spdy/spdy_session.cc

Issue 10810069: SPDY: Add WriteHeaders interface to SpdySession and SpdyStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: support AddEvent Created 8 years, 5 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/spdy/spdy_session.h ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index d0190df22693eb3dfe13d49aa2ebc4d3ba05d850..7ba879788f9f5378bf7e7826fa4639751287333a 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -658,6 +658,30 @@ int SpdySession::WriteCredentialFrame(const std::string& origin,
return ERR_IO_PENDING;
}
+int SpdySession::WriteHeaders(SpdyStreamId stream_id,
+ const SpdyHeaderBlock& headers,
+ SpdyControlFlags flags) {
+ // Find our stream
+ CHECK(IsStreamActive(stream_id));
+ scoped_refptr<SpdyStream> stream = active_streams_[stream_id];
+ CHECK_EQ(stream->stream_id(), stream_id);
+
+ // Create and send a HEADER frame.
+ scoped_ptr<SpdyHeadersControlFrame> frame(
+ buffered_spdy_framer_->CreateHeaders(stream_id, flags, true, &headers));
Ryan Hamilton 2012/07/24 17:53:03 is "true" the the boolean for compressed? If so,
Takashi Toyoshima 2012/07/25 08:44:24 OK, I see the current issue. I change this flag to
+ QueueFrame(frame.get(), stream->priority(), stream);
+
+ if (net_log().IsLoggingAllEvents()) {
+ bool fin = flags & CONTROL_FLAG_FIN;
+ net_log().AddEvent(
+ NetLog::TYPE_SPDY_SESSION_HEADERS,
mmenke 2012/07/24 16:42:41 This is what's logged when we receive headers befo
Ryan Hamilton 2012/07/24 17:53:03 Yes, I think we should add a new TYPE_SPDY_SESSION
Takashi Toyoshima 2012/07/25 08:44:24 Done.
+ base::Bind(&NetLogSpdySynCallback,
+ &headers, fin, /*unidirectional=*/false,
+ stream_id, 0));
+ }
+ return ERR_IO_PENDING;
+}
+
int SpdySession::WriteStreamData(SpdyStreamId stream_id,
net::IOBuffer* data, int len,
SpdyDataFlags flags) {
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698