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

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

Issue 2675593002: Spdy{RstStream,GoAway}Status -> SpdyErrorCode. (Closed)
Patch Set: Merged master, which includes 145087791. Created 3 years, 10 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
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <memory>
10 #include <string>
9 #include <utility> 11 #include <utility>
10 12
11 #include "base/bind.h" 13 #include "base/bind.h"
12 #include "base/callback_helpers.h" 14 #include "base/callback_helpers.h"
13 #include "base/location.h" 15 #include "base/location.h"
14 #include "base/logging.h" 16 #include "base/logging.h"
15 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
16 #include "base/threading/thread_task_runner_handle.h" 18 #include "base/threading/thread_task_runner_handle.h"
17 #include "base/values.h" 19 #include "base/values.h"
18 #include "net/base/host_port_pair.h" 20 #include "net/base/host_port_pair.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 if (rv != ERR_IO_PENDING) 431 if (rv != ERR_IO_PENDING)
430 OnRequestBodyReadCompleted(rv); 432 OnRequestBodyReadCompleted(rv);
431 } 433 }
432 434
433 void SpdyHttpStream::InitializeStreamHelper() { 435 void SpdyHttpStream::InitializeStreamHelper() {
434 stream_->SetDelegate(this); 436 stream_->SetDelegate(this);
435 was_alpn_negotiated_ = stream_->WasAlpnNegotiated(); 437 was_alpn_negotiated_ = stream_->WasAlpnNegotiated();
436 } 438 }
437 439
438 void SpdyHttpStream::ResetStreamInternal() { 440 void SpdyHttpStream::ResetStreamInternal() {
439 spdy_session_->ResetStream(stream()->stream_id(), RST_STREAM_INTERNAL_ERROR, 441 spdy_session_->ResetStream(stream()->stream_id(), ERROR_CODE_INTERNAL_ERROR,
440 std::string()); 442 std::string());
441 } 443 }
442 444
443 void SpdyHttpStream::OnRequestBodyReadCompleted(int status) { 445 void SpdyHttpStream::OnRequestBodyReadCompleted(int status) {
444 if (status < 0) { 446 if (status < 0) {
445 DCHECK_NE(ERR_IO_PENDING, status); 447 DCHECK_NE(ERR_IO_PENDING, status);
446 // Post |request_callback_| with received error. This should be posted 448 // Post |request_callback_| with received error. This should be posted
447 // before ResetStreamInternal, because the latter would call 449 // before ResetStreamInternal, because the latter would call
448 // |request_callback_| via OnClose with an error code potentially different 450 // |request_callback_| via OnClose with an error code potentially different
449 // from |status|. 451 // from |status|.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; 575 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2;
574 return; 576 return;
575 } 577 }
576 578
577 void SpdyHttpStream::SetPriority(RequestPriority priority) { 579 void SpdyHttpStream::SetPriority(RequestPriority priority) {
578 // TODO(akalin): Plumb this through to |stream_request_| and 580 // TODO(akalin): Plumb this through to |stream_request_| and
579 // |stream_|. 581 // |stream_|.
580 } 582 }
581 583
582 } // namespace net 584 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698