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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Original CL, as was submitted, and previously reverted Created 6 years, 8 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
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 0127d581c417673541c096e01def6ead7aa31bfa..44ed85a3cd0a84e07132486034300dc472a922cb 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -722,16 +722,18 @@ int QuicStreamFactory::CreateSession(
// does not consume "too much" memory. If we see bursty packet loss, we may
// revisit this setting and test for its impact.
const int32 kSocketBufferSize(TcpReceiver::kReceiveWindowTCP);
- if (!socket->SetReceiveBufferSize(kSocketBufferSize)) {
+ rv = socket->SetReceiveBufferSize(kSocketBufferSize);
+ if (rv != OK) {
HistogramCreateSessionFailure(CREATION_ERROR_SETTING_RECEIVE_BUFFER);
- return ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR;
+ return rv;
}
// Set a buffer large enough to contain the initial CWND's worth of packet
// to work around the problem with CHLO packets being sent out with the
// wrong encryption level, when the send buffer is full.
- if (!socket->SetSendBufferSize(kMaxPacketSize * 20)) {
+ rv = socket->SetSendBufferSize(kMaxPacketSize * 20);
+ if (rv != OK) {
HistogramCreateSessionFailure(CREATION_ERROR_SETTING_SEND_BUFFER);
- return ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR;
+ return rv;
}
scoped_ptr<QuicDefaultPacketWriter> writer(

Powered by Google App Engine
This is Rietveld 408576698