OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_test_util_common.h" | 5 #include "net/spdy/spdy_test_util_common.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <utility> | 10 #include <utility> |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 } | 671 } |
672 | 672 |
673 void SpdySessionPoolPeer::RemoveAliases(const SpdySessionKey& key) { | 673 void SpdySessionPoolPeer::RemoveAliases(const SpdySessionKey& key) { |
674 pool_->RemoveAliases(key); | 674 pool_->RemoveAliases(key); |
675 } | 675 } |
676 | 676 |
677 void SpdySessionPoolPeer::SetEnableSendingInitialData(bool enabled) { | 677 void SpdySessionPoolPeer::SetEnableSendingInitialData(bool enabled) { |
678 pool_->enable_sending_initial_data_ = enabled; | 678 pool_->enable_sending_initial_data_ = enabled; |
679 } | 679 } |
680 | 680 |
681 void SpdySessionPoolPeer::SetSessionMaxRecvWindowSize(size_t window) { | |
682 pool_->session_max_recv_window_size_ = window; | |
683 } | |
684 | |
685 void SpdySessionPoolPeer::SetStreamInitialRecvWindowSize(size_t window) { | |
686 pool_->stream_max_recv_window_size_ = window; | |
687 } | |
688 | |
689 SpdyTestUtil::SpdyTestUtil() : default_url_(GURL(kDefaultUrl)) {} | 681 SpdyTestUtil::SpdyTestUtil() : default_url_(GURL(kDefaultUrl)) {} |
690 | 682 |
691 SpdyTestUtil::~SpdyTestUtil() {} | 683 SpdyTestUtil::~SpdyTestUtil() {} |
692 | 684 |
693 void SpdyTestUtil::AddUrlToHeaderBlock(base::StringPiece url, | 685 void SpdyTestUtil::AddUrlToHeaderBlock(base::StringPiece url, |
694 SpdyHeaderBlock* headers) const { | 686 SpdyHeaderBlock* headers) const { |
695 std::string scheme, host, path; | 687 std::string scheme, host, path; |
696 ParseUrl(url, &scheme, &host, &path); | 688 ParseUrl(url, &scheme, &host, &path); |
697 (*headers)[GetHostKey()] = host; | 689 (*headers)[GetHostKey()] = host; |
698 (*headers)[GetSchemeKey()] = scheme; | 690 (*headers)[GetSchemeKey()] = scheme; |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 headers[GetSchemeKey()] = scheme.c_str(); | 1129 headers[GetSchemeKey()] = scheme.c_str(); |
1138 headers[GetPathKey()] = path.c_str(); | 1130 headers[GetPathKey()] = path.c_str(); |
1139 if (content_length) { | 1131 if (content_length) { |
1140 std::string length_str = base::Int64ToString(*content_length); | 1132 std::string length_str = base::Int64ToString(*content_length); |
1141 headers["content-length"] = length_str; | 1133 headers["content-length"] = length_str; |
1142 } | 1134 } |
1143 return headers; | 1135 return headers; |
1144 } | 1136 } |
1145 | 1137 |
1146 } // namespace net | 1138 } // namespace net |
OLD | NEW |