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

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

Issue 9225028: Add NetLog entries to preconnect HttpStreamFactoryImpl::Jobs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | 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/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
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
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
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698