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

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

Issue 2302573002: Revert of Increase maximum size of the HPACK decoder dynamic table to 64 kB. (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 | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_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_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 connection_ = std::move(connection); 724 connection_ = std::move(connection);
725 is_secure_ = is_secure; 725 is_secure_ = is_secure;
726 certificate_error_code_ = certificate_error_code; 726 certificate_error_code_ = certificate_error_code;
727 727
728 session_send_window_size_ = kDefaultInitialWindowSize; 728 session_send_window_size_ = kDefaultInitialWindowSize;
729 session_recv_window_size_ = kDefaultInitialWindowSize; 729 session_recv_window_size_ = kDefaultInitialWindowSize;
730 730
731 buffered_spdy_framer_.reset(new BufferedSpdyFramer()); 731 buffered_spdy_framer_.reset(new BufferedSpdyFramer());
732 buffered_spdy_framer_->set_visitor(this); 732 buffered_spdy_framer_->set_visitor(this);
733 buffered_spdy_framer_->set_debug_visitor(this); 733 buffered_spdy_framer_->set_debug_visitor(this);
734 buffered_spdy_framer_->UpdateHeaderDecoderTableSize(kMaxHeaderTableSize);
735 734
736 net_log_.AddEvent(NetLog::TYPE_HTTP2_SESSION_INITIALIZED, 735 net_log_.AddEvent(NetLog::TYPE_HTTP2_SESSION_INITIALIZED,
737 base::Bind(&NetLogSpdyInitializedCallback, 736 base::Bind(&NetLogSpdyInitializedCallback,
738 connection_->socket()->NetLog().source())); 737 connection_->socket()->NetLog().source()));
739 738
740 DCHECK_EQ(availability_state_, STATE_AVAILABLE); 739 DCHECK_EQ(availability_state_, STATE_AVAILABLE);
741 connection_->AddHigherLayeredPool(this); 740 connection_->AddHigherLayeredPool(this);
742 if (enable_sending_initial_data_) 741 if (enable_sending_initial_data_)
743 SendInitialData(); 742 SendInitialData();
744 pool_ = pool; 743 pool_ = pool;
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 new SpdySerializedFrame(const_cast<char*>(kHttp2ConnectionHeaderPrefix), 2701 new SpdySerializedFrame(const_cast<char*>(kHttp2ConnectionHeaderPrefix),
2703 kHttp2ConnectionHeaderPrefixSize, 2702 kHttp2ConnectionHeaderPrefixSize,
2704 false /* take_ownership */)); 2703 false /* take_ownership */));
2705 // Count the prefix as part of the subsequent SETTINGS frame. 2704 // Count the prefix as part of the subsequent SETTINGS frame.
2706 EnqueueSessionWrite(HIGHEST, SETTINGS, 2705 EnqueueSessionWrite(HIGHEST, SETTINGS,
2707 std::move(connection_header_prefix_frame)); 2706 std::move(connection_header_prefix_frame));
2708 2707
2709 // First, notify the server about the settings they should use when 2708 // First, notify the server about the settings they should use when
2710 // communicating with us. 2709 // communicating with us.
2711 SettingsMap settings_map; 2710 SettingsMap settings_map;
2712 settings_map[SETTINGS_HEADER_TABLE_SIZE] = 2711 // Create a new settings frame notifying the server of our
2713 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxHeaderTableSize); 2712 // max concurrent streams and initial window size.
2714 settings_map[SETTINGS_MAX_CONCURRENT_STREAMS] = 2713 settings_map[SETTINGS_MAX_CONCURRENT_STREAMS] =
2715 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams); 2714 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams);
2716 if (stream_max_recv_window_size_ != kDefaultInitialWindowSize) { 2715 if (stream_max_recv_window_size_ != kDefaultInitialWindowSize) {
2717 settings_map[SETTINGS_INITIAL_WINDOW_SIZE] = 2716 settings_map[SETTINGS_INITIAL_WINDOW_SIZE] =
2718 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, stream_max_recv_window_size_); 2717 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, stream_max_recv_window_size_);
2719 } 2718 }
2720 SendSettings(settings_map); 2719 SendSettings(settings_map);
2721 2720
2722 // Next, notify the server about our initial recv window size. 2721 // Next, notify the server about our initial recv window size.
2723 // Bump up the receive window size to the real initial value. This 2722 // Bump up the receive window size to the real initial value. This
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
3143 if (!queue->empty()) { 3142 if (!queue->empty()) {
3144 SpdyStreamId stream_id = queue->front(); 3143 SpdyStreamId stream_id = queue->front();
3145 queue->pop_front(); 3144 queue->pop_front();
3146 return stream_id; 3145 return stream_id;
3147 } 3146 }
3148 } 3147 }
3149 return 0; 3148 return 0;
3150 } 3149 }
3151 3150
3152 } // namespace net 3151 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698