| OLD | NEW | 
|---|
| 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/chromium/quic_chromium_client_session.h" | 5 #include "net/quic/chromium/quic_chromium_client_session.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" | 
| 10 #include "base/location.h" | 10 #include "base/location.h" | 
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 721     return ERR_CONNECTION_CLOSED; | 721     return ERR_CONNECTION_CLOSED; | 
| 722 | 722 | 
| 723   if (IsCryptoHandshakeConfirmed()) | 723   if (IsCryptoHandshakeConfirmed()) | 
| 724     return OK; | 724     return OK; | 
| 725 | 725 | 
| 726   waiting_for_confirmation_callbacks_.push_back(callback); | 726   waiting_for_confirmation_callbacks_.push_back(callback); | 
| 727   return ERR_IO_PENDING; | 727   return ERR_IO_PENDING; | 
| 728 } | 728 } | 
| 729 | 729 | 
| 730 int QuicChromiumClientSession::TryCreateStream(StreamRequest* request) { | 730 int QuicChromiumClientSession::TryCreateStream(StreamRequest* request) { | 
|  | 731   if (stream_factory_ && stream_factory_->IsQuicBroken(this)) { | 
|  | 732     DVLOG(1) << "QUIC broken."; | 
|  | 733     return ERR_QUIC_PROTOCOL_ERROR; | 
|  | 734   } | 
|  | 735 | 
| 731   if (goaway_received()) { | 736   if (goaway_received()) { | 
| 732     DVLOG(1) << "Going away."; | 737     DVLOG(1) << "Going away."; | 
| 733     return ERR_CONNECTION_CLOSED; | 738     return ERR_CONNECTION_CLOSED; | 
| 734   } | 739   } | 
| 735 | 740 | 
| 736   if (!connection()->connected()) { | 741   if (!connection()->connected()) { | 
| 737     DVLOG(1) << "Already closed."; | 742     DVLOG(1) << "Already closed."; | 
| 738     return ERR_CONNECTION_CLOSED; | 743     return ERR_CONNECTION_CLOSED; | 
| 739   } | 744   } | 
| 740 | 745 | 
| (...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1758 } | 1763 } | 
| 1759 | 1764 | 
| 1760 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 1765 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 
| 1761   // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 1766   // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 
| 1762   // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 1767   // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 
| 1763   // unacked packet map. | 1768   // unacked packet map. | 
| 1764   return base::trace_event::EstimateMemoryUsage(packet_readers_); | 1769   return base::trace_event::EstimateMemoryUsage(packet_readers_); | 
| 1765 } | 1770 } | 
| 1766 | 1771 | 
| 1767 }  // namespace net | 1772 }  // namespace net | 
| OLD | NEW | 
|---|