| 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 // Preconnect the first. | 875 // Preconnect the first. |
| 876 SSLConfig preconnect_ssl_config; | 876 SSLConfig preconnect_ssl_config; |
| 877 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config); | 877 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config); |
| 878 HttpStreamFactory* http_stream_factory = | 878 HttpStreamFactory* http_stream_factory = |
| 879 helper.session()->http_stream_factory(); | 879 helper.session()->http_stream_factory(); |
| 880 if (http_stream_factory->has_next_protos()) { | 880 if (http_stream_factory->has_next_protos()) { |
| 881 preconnect_ssl_config.next_protos = http_stream_factory->next_protos(); | 881 preconnect_ssl_config.next_protos = http_stream_factory->next_protos(); |
| 882 } | 882 } |
| 883 | 883 |
| 884 http_stream_factory->PreconnectStreams( | 884 http_stream_factory->PreconnectStreams( |
| 885 1, httpreq, preconnect_ssl_config, preconnect_ssl_config, log); | 885 1, httpreq, preconnect_ssl_config, preconnect_ssl_config); |
| 886 | 886 |
| 887 out.rv = trans1->Start(&httpreq, callback1.callback(), log); | 887 out.rv = trans1->Start(&httpreq, callback1.callback(), log); |
| 888 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 888 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
| 889 out.rv = trans2->Start(&httpreq, callback2.callback(), log); | 889 out.rv = trans2->Start(&httpreq, callback2.callback(), log); |
| 890 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 890 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
| 891 | 891 |
| 892 out.rv = callback1.WaitForResult(); | 892 out.rv = callback1.WaitForResult(); |
| 893 ASSERT_EQ(OK, out.rv); | 893 ASSERT_EQ(OK, out.rv); |
| 894 out.rv = callback2.WaitForResult(); | 894 out.rv = callback2.WaitForResult(); |
| 895 ASSERT_EQ(OK, out.rv); | 895 ASSERT_EQ(OK, out.rv); |
| (...skipping 4798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5694 << " Write index: " | 5694 << " Write index: " |
| 5695 << data->write_index(); | 5695 << data->write_index(); |
| 5696 | 5696 |
| 5697 // Verify the SYN_REPLY. | 5697 // Verify the SYN_REPLY. |
| 5698 HttpResponseInfo response = *trans->GetResponseInfo(); | 5698 HttpResponseInfo response = *trans->GetResponseInfo(); |
| 5699 EXPECT_TRUE(response.headers != NULL); | 5699 EXPECT_TRUE(response.headers != NULL); |
| 5700 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); | 5700 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); |
| 5701 } | 5701 } |
| 5702 | 5702 |
| 5703 } // namespace net | 5703 } // namespace net |
| OLD | NEW |