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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 15936003: [SPDY] Refactor SpdyStream::Delegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 int compression_pct = 100 - (100 * compressed_size) / uncompressed_size; 1592 int compression_pct = 100 - (100 * compressed_size) / uncompressed_size;
1593 UMA_HISTOGRAM_PERCENTAGE("Net.SpdySynStreamCompressionPercentage", 1593 UMA_HISTOGRAM_PERCENTAGE("Net.SpdySynStreamCompressionPercentage",
1594 compression_pct); 1594 compression_pct);
1595 } 1595 }
1596 1596
1597 1597
1598 bool SpdySession::Respond(const SpdyHeaderBlock& headers, SpdyStream* stream) { 1598 bool SpdySession::Respond(const SpdyHeaderBlock& headers, SpdyStream* stream) {
1599 int rv = OK; 1599 int rv = OK;
1600 SpdyStreamId stream_id = stream->stream_id(); 1600 SpdyStreamId stream_id = stream->stream_id();
1601 // May invalidate |stream|. 1601 // May invalidate |stream|.
1602 rv = stream->OnResponseReceived(headers); 1602 rv = stream->OnResponseHeadersReceived(headers);
1603 if (rv < 0) { 1603 if (rv < 0) {
1604 DCHECK_NE(rv, ERR_IO_PENDING); 1604 DCHECK_NE(rv, ERR_IO_PENDING);
1605 CloseActiveStream(stream_id, rv); 1605 CloseActiveStream(stream_id, rv);
1606 return false; 1606 return false;
1607 } 1607 }
1608 return true; 1608 return true;
1609 } 1609 }
1610 1610
1611 void SpdySession::OnSynStream(SpdyStreamId stream_id, 1611 void SpdySession::OnSynStream(SpdyStreamId stream_id,
1612 SpdyStreamId associated_stream_id, 1612 SpdyStreamId associated_stream_id,
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2454 if (!queue->empty()) { 2454 if (!queue->empty()) {
2455 SpdyStreamId stream_id = queue->front(); 2455 SpdyStreamId stream_id = queue->front();
2456 queue->pop_front(); 2456 queue->pop_front();
2457 return stream_id; 2457 return stream_id;
2458 } 2458 }
2459 } 2459 }
2460 return 0; 2460 return 0;
2461 } 2461 }
2462 2462
2463 } // namespace net 2463 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698