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

Side by Side Diff: net/quic/chromium/quic_stream_factory.cc

Issue 2287073002: Ignore errors on SetDoNotFragment on platforms where it is not implemented. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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/quic/chromium/quic_stream_factory.h" 5 #include "net/quic/chromium/quic_stream_factory.h"
6 6
7 #include <openssl/aead.h> 7 #include <openssl/aead.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <tuple> 10 #include <tuple>
(...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 return rv; 1699 return rv;
1700 } 1700 }
1701 1701
1702 rv = socket->SetReceiveBufferSize(socket_receive_buffer_size_); 1702 rv = socket->SetReceiveBufferSize(socket_receive_buffer_size_);
1703 if (rv != OK) { 1703 if (rv != OK) {
1704 HistogramCreateSessionFailure(CREATION_ERROR_SETTING_RECEIVE_BUFFER); 1704 HistogramCreateSessionFailure(CREATION_ERROR_SETTING_RECEIVE_BUFFER);
1705 return rv; 1705 return rv;
1706 } 1706 }
1707 1707
1708 rv = socket->SetDoNotFragment(); 1708 rv = socket->SetDoNotFragment();
1709 if (rv != OK) { 1709 // SetDoNotFragment is not implemented on all platforms, so ignore errors.
1710 if (rv != OK && rv != ERR_NOT_IMPLEMENTED) {
Ryan Hamilton 2016/08/27 21:55:56 Alternatively, we could ignore ALL errors since it
1710 HistogramCreateSessionFailure(CREATION_ERROR_SETTING_NO_NOT_FRAGMENT); 1711 HistogramCreateSessionFailure(CREATION_ERROR_SETTING_NO_NOT_FRAGMENT);
mef 2016/08/29 19:27:14 nit: This should probably be CREATION_ERROR_SETTIN
Ryan Hamilton 2016/08/29 19:42:48 Good point. Will do so in a followup since this ha
Ryan Hamilton 2016/08/29 23:31:15 Ok, I gave up on the CQ and landed this manually,
1711 return rv; 1712 return rv;
1712 } 1713 }
1713 1714
1714 // Set a buffer large enough to contain the initial CWND's worth of packet 1715 // Set a buffer large enough to contain the initial CWND's worth of packet
1715 // to work around the problem with CHLO packets being sent out with the 1716 // to work around the problem with CHLO packets being sent out with the
1716 // wrong encryption level, when the send buffer is full. 1717 // wrong encryption level, when the send buffer is full.
1717 rv = socket->SetSendBufferSize(kMaxPacketSize * 20); 1718 rv = socket->SetSendBufferSize(kMaxPacketSize * 20);
1718 if (rv != OK) { 1719 if (rv != OK) {
1719 HistogramCreateSessionFailure(CREATION_ERROR_SETTING_SEND_BUFFER); 1720 HistogramCreateSessionFailure(CREATION_ERROR_SETTING_SEND_BUFFER);
1720 return rv; 1721 return rv;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 // Since the session was active, there's no longer an 2027 // Since the session was active, there's no longer an
2027 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 2028 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
2028 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 2029 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
2029 // it as recently broken, which means that 0-RTT will be disabled but we'll 2030 // it as recently broken, which means that 0-RTT will be disabled but we'll
2030 // still race. 2031 // still race.
2031 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 2032 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
2032 alternative_service); 2033 alternative_service);
2033 } 2034 }
2034 2035
2035 } // namespace net 2036 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698