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

Side by Side Diff: net/quic/quic_session.cc

Issue 763833003: Remove using namespace in net/quic/quic_stream_sequencer.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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/quic/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/proof_verifier.h" 8 #include "net/quic/crypto/proof_verifier.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flow_controller.h" 10 #include "net/quic/quic_flow_controller.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 void QuicSession::SendRstStream(QuicStreamId id, 375 void QuicSession::SendRstStream(QuicStreamId id,
376 QuicRstStreamErrorCode error, 376 QuicRstStreamErrorCode error,
377 QuicStreamOffset bytes_written) { 377 QuicStreamOffset bytes_written) {
378 if (connection()->connected()) { 378 if (connection()->connected()) {
379 // Only send a RST_STREAM frame if still connected. 379 // Only send a RST_STREAM frame if still connected.
380 connection_->SendRstStream(id, error, bytes_written); 380 connection_->SendRstStream(id, error, bytes_written);
381 } 381 }
382 CloseStreamInner(id, true); 382 CloseStreamInner(id, true);
383 } 383 }
384 384
385 void QuicSession::SendGoAway(QuicErrorCode error_code, const string& reason) { 385 void QuicSession::SendGoAway(QuicErrorCode error_code,
386 const std::string& reason) {
386 if (goaway_sent_) { 387 if (goaway_sent_) {
387 return; 388 return;
388 } 389 }
389 goaway_sent_ = true; 390 goaway_sent_ = true;
390 connection_->SendGoAway(error_code, largest_peer_created_stream_id_, reason); 391 connection_->SendGoAway(error_code, largest_peer_created_stream_id_, reason);
391 } 392 }
392 393
393 void QuicSession::CloseStream(QuicStreamId stream_id) { 394 void QuicSession::CloseStream(QuicStreamId stream_id) {
394 CloseStreamInner(stream_id, false); 395 CloseStreamInner(stream_id, false);
395 } 396 }
(...skipping 26 matching lines...) Expand all
422 } 423 }
423 424
424 stream_map_.erase(it); 425 stream_map_.erase(it);
425 stream->OnClose(); 426 stream->OnClose();
426 // Decrease the number of streams being emulated when a new one is opened. 427 // Decrease the number of streams being emulated when a new one is opened.
427 connection_->SetNumOpenStreams(stream_map_.size()); 428 connection_->SetNumOpenStreams(stream_map_.size());
428 } 429 }
429 430
430 void QuicSession::UpdateFlowControlOnFinalReceivedByteOffset( 431 void QuicSession::UpdateFlowControlOnFinalReceivedByteOffset(
431 QuicStreamId stream_id, QuicStreamOffset final_byte_offset) { 432 QuicStreamId stream_id, QuicStreamOffset final_byte_offset) {
432 map<QuicStreamId, QuicStreamOffset>::iterator it = 433 std::map<QuicStreamId, QuicStreamOffset>::iterator it =
433 locally_closed_streams_highest_offset_.find(stream_id); 434 locally_closed_streams_highest_offset_.find(stream_id);
434 if (it == locally_closed_streams_highest_offset_.end()) { 435 if (it == locally_closed_streams_highest_offset_.end()) {
435 return; 436 return;
436 } 437 }
437 438
438 DVLOG(1) << ENDPOINT << "Received final byte offset " << final_byte_offset 439 DVLOG(1) << ENDPOINT << "Received final byte offset " << final_byte_offset
439 << " for stream " << stream_id; 440 << " for stream " << stream_id;
440 uint64 offset_diff = final_byte_offset - it->second; 441 uint64 offset_diff = final_byte_offset - it->second;
441 if (flow_controller_->UpdateHighestReceivedOffset( 442 if (flow_controller_->UpdateHighestReceivedOffset(
442 flow_controller_->highest_received_byte_offset() + offset_diff)) { 443 flow_controller_->highest_received_byte_offset() + offset_diff)) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 for (DataStreamMap::iterator it = stream_map_.begin(); 776 for (DataStreamMap::iterator it = stream_map_.begin();
776 it != stream_map_.end(); ++it) { 777 it != stream_map_.end(); ++it) {
777 if (it->second->flow_controller()->IsBlocked()) { 778 if (it->second->flow_controller()->IsBlocked()) {
778 return true; 779 return true;
779 } 780 }
780 } 781 }
781 return false; 782 return false;
782 } 783 }
783 784
784 } // namespace net 785 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698