| Index: net/http/http_stream_factory_impl_unittest.cc
|
| diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
|
| index 4dedd604de12fc33411f5ebc5ee64a6a0c3e8066..a5ae9a03daabae0fb6e32d3b9bf9d0180fcda44f 100644
|
| --- a/net/http/http_stream_factory_impl_unittest.cc
|
| +++ b/net/http/http_stream_factory_impl_unittest.cc
|
| @@ -89,7 +89,7 @@ class MockWebSocketHandshakeStream : public WebSocketHandshakeStreamBase {
|
| // HttpStream methods
|
| int InitializeStream(const HttpRequestInfo* request_info,
|
| RequestPriority priority,
|
| - const BoundNetLog& net_log,
|
| + const NetLogWithSource& net_log,
|
| const CompletionCallback& callback) override {
|
| return ERR_IO_PENDING;
|
| }
|
| @@ -383,7 +383,7 @@ class CapturePreconnectsSocketPool : public ParentPool {
|
| ClientSocketPool::RespectLimits respect_limits,
|
| ClientSocketHandle* handle,
|
| const CompletionCallback& callback,
|
| - const BoundNetLog& net_log) override {
|
| + const NetLogWithSource& net_log) override {
|
| ADD_FAILURE();
|
| return ERR_UNEXPECTED;
|
| }
|
| @@ -391,7 +391,7 @@ class CapturePreconnectsSocketPool : public ParentPool {
|
| void RequestSockets(const std::string& group_name,
|
| const void* socket_params,
|
| int num_sockets,
|
| - const BoundNetLog& net_log) override {
|
| + const NetLogWithSource& net_log) override {
|
| last_num_streams_ = num_sockets;
|
| }
|
|
|
| @@ -673,7 +673,7 @@ TEST_F(HttpStreamFactoryTest, JobNotifiesProxy) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| // The proxy that failed should now be known to the proxy_service as bad.
|
| @@ -758,7 +758,7 @@ TEST_F(HttpStreamFactoryTest, QuicProxyMarkedAsBad) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| // The proxy that failed should now be known to the proxy_service as bad.
|
| @@ -961,7 +961,7 @@ TEST_F(HttpStreamFactoryTest, WithQUICAlternativeProxyMarkedAsBad) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| // The proxy that failed should now be known to the proxy_service as
|
| @@ -1064,7 +1064,7 @@ TEST_F(HttpStreamFactoryTest, WithQUICAlternativeProxyNotMarkedAsBad) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| // The proxy that failed should now be known to the proxy_service as
|
| @@ -1230,7 +1230,7 @@ TEST_F(HttpStreamFactoryTest, PrivacyModeDisablesChannelId) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| // The stream shouldn't come from spdy as we are using different privacy mode
|
| @@ -1306,7 +1306,7 @@ TEST_F(HttpStreamFactoryTest, PrivacyModeUsesDifferentSocketPoolGroup) {
|
| std::unique_ptr<HttpStreamRequest> request1(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1);
|
| @@ -1314,7 +1314,7 @@ TEST_F(HttpStreamFactoryTest, PrivacyModeUsesDifferentSocketPoolGroup) {
|
| std::unique_ptr<HttpStreamRequest> request2(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1);
|
| @@ -1323,7 +1323,7 @@ TEST_F(HttpStreamFactoryTest, PrivacyModeUsesDifferentSocketPoolGroup) {
|
| std::unique_ptr<HttpStreamRequest> request3(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
|
|
| EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 2);
|
| @@ -1352,7 +1352,7 @@ TEST_F(HttpStreamFactoryTest, GetLoadState) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
|
|
| EXPECT_EQ(LOAD_STATE_RESOLVING_HOST, request->GetLoadState());
|
|
|
| @@ -1381,7 +1381,7 @@ TEST_F(HttpStreamFactoryTest, RequestHttpStream) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| ASSERT_TRUE(nullptr != waiter.stream());
|
| @@ -1425,7 +1425,7 @@ TEST_F(HttpStreamFactoryTest, RequestHttpStreamOverSSL) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| ASSERT_TRUE(nullptr != waiter.stream());
|
| @@ -1467,7 +1467,7 @@ TEST_F(HttpStreamFactoryTest, RequestHttpStreamOverProxy) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| ASSERT_TRUE(nullptr != waiter.stream());
|
| @@ -1514,9 +1514,9 @@ TEST_F(HttpStreamFactoryTest, RequestWebSocketBasicHandshakeStream) {
|
| WebSocketStreamCreateHelper create_helper;
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory_for_websocket()
|
| - ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
|
| - ssl_config, ssl_config, &waiter,
|
| - &create_helper, BoundNetLog()));
|
| + ->RequestWebSocketHandshakeStream(
|
| + request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| + &create_helper, NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| EXPECT_TRUE(nullptr == waiter.stream());
|
| @@ -1557,9 +1557,9 @@ TEST_F(HttpStreamFactoryTest, RequestWebSocketBasicHandshakeStreamOverSSL) {
|
| WebSocketStreamCreateHelper create_helper;
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory_for_websocket()
|
| - ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
|
| - ssl_config, ssl_config, &waiter,
|
| - &create_helper, BoundNetLog()));
|
| + ->RequestWebSocketHandshakeStream(
|
| + request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| + &create_helper, NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| EXPECT_TRUE(nullptr == waiter.stream());
|
| @@ -1598,9 +1598,9 @@ TEST_F(HttpStreamFactoryTest, RequestWebSocketBasicHandshakeStreamOverProxy) {
|
| WebSocketStreamCreateHelper create_helper;
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory_for_websocket()
|
| - ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
|
| - ssl_config, ssl_config, &waiter,
|
| - &create_helper, BoundNetLog()));
|
| + ->RequestWebSocketHandshakeStream(
|
| + request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| + &create_helper, NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| EXPECT_TRUE(nullptr == waiter.stream());
|
| @@ -1654,7 +1654,7 @@ TEST_F(HttpStreamFactoryTest, RequestSpdyHttpStream) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestStream(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| EXPECT_TRUE(nullptr == waiter.websocket_stream());
|
| @@ -1700,7 +1700,7 @@ TEST_F(HttpStreamFactoryTest, RequestBidirectionalStreamImpl) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestBidirectionalStreamImpl(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| EXPECT_FALSE(waiter.websocket_stream());
|
| @@ -1868,7 +1868,7 @@ TEST_P(HttpStreamFactoryBidirectionalQuicTest,
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session()->http_stream_factory()->RequestBidirectionalStreamImpl(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
|
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| @@ -1884,7 +1884,7 @@ TEST_P(HttpStreamFactoryBidirectionalQuicTest,
|
| bidi_request_info.priority = LOWEST;
|
|
|
| TestBidirectionalDelegate delegate;
|
| - stream_impl->Start(&bidi_request_info, BoundNetLog(),
|
| + stream_impl->Start(&bidi_request_info, NetLogWithSource(),
|
| /*send_request_headers_automatically=*/true, &delegate,
|
| nullptr);
|
| delegate.WaitUntilDone();
|
| @@ -1933,7 +1933,7 @@ TEST_P(HttpStreamFactoryBidirectionalQuicTest,
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session()->http_stream_factory()->RequestBidirectionalStreamImpl(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
|
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| @@ -1991,7 +1991,7 @@ TEST_P(HttpStreamFactoryBidirectionalQuicTest,
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session()->http_stream_factory()->RequestBidirectionalStreamImpl(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
|
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| @@ -2007,7 +2007,7 @@ TEST_P(HttpStreamFactoryBidirectionalQuicTest,
|
| bidi_request_info.priority = LOWEST;
|
|
|
| TestBidirectionalDelegate delegate;
|
| - stream_impl->Start(&bidi_request_info, BoundNetLog(),
|
| + stream_impl->Start(&bidi_request_info, NetLogWithSource(),
|
| /*send_request_headers_automatically=*/true, &delegate,
|
| nullptr);
|
| delegate.WaitUntilDone();
|
| @@ -2058,7 +2058,7 @@ TEST_F(HttpStreamFactoryTest, RequestBidirectionalStreamImplFailure) {
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory()->RequestBidirectionalStreamImpl(
|
| request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| - BoundNetLog()));
|
| + NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| ASSERT_THAT(waiter.error_status(), IsError(ERR_FAILED));
|
| @@ -2104,9 +2104,9 @@ TEST_F(HttpStreamFactoryTest, RequestWebSocketSpdyHandshakeStreamButGetSSL) {
|
| WebSocketStreamCreateHelper create_helper;
|
| std::unique_ptr<HttpStreamRequest> request1(
|
| session->http_stream_factory_for_websocket()
|
| - ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
|
| - ssl_config, ssl_config, &waiter1,
|
| - &create_helper, BoundNetLog()));
|
| + ->RequestWebSocketHandshakeStream(
|
| + request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter1,
|
| + &create_helper, NetLogWithSource()));
|
| waiter1.WaitForStream();
|
| EXPECT_TRUE(waiter1.stream_done());
|
| ASSERT_TRUE(nullptr != waiter1.websocket_stream());
|
| @@ -2151,9 +2151,9 @@ TEST_F(HttpStreamFactoryTest, DISABLED_RequestWebSocketSpdyHandshakeStream) {
|
| WebSocketStreamCreateHelper create_helper;
|
| std::unique_ptr<HttpStreamRequest> request1(
|
| session->http_stream_factory_for_websocket()
|
| - ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
|
| - ssl_config, ssl_config, &waiter1,
|
| - &create_helper, BoundNetLog()));
|
| + ->RequestWebSocketHandshakeStream(
|
| + request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter1,
|
| + &create_helper, NetLogWithSource()));
|
| waiter1.WaitForStream();
|
| EXPECT_TRUE(waiter1.stream_done());
|
| ASSERT_TRUE(nullptr != waiter1.websocket_stream());
|
| @@ -2164,9 +2164,9 @@ TEST_F(HttpStreamFactoryTest, DISABLED_RequestWebSocketSpdyHandshakeStream) {
|
| StreamRequestWaiter waiter2;
|
| std::unique_ptr<HttpStreamRequest> request2(
|
| session->http_stream_factory_for_websocket()
|
| - ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
|
| - ssl_config, ssl_config, &waiter2,
|
| - &create_helper, BoundNetLog()));
|
| + ->RequestWebSocketHandshakeStream(
|
| + request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter2,
|
| + &create_helper, NetLogWithSource()));
|
| waiter2.WaitForStream();
|
| EXPECT_TRUE(waiter2.stream_done());
|
| ASSERT_TRUE(nullptr != waiter2.websocket_stream());
|
| @@ -2230,9 +2230,9 @@ TEST_F(HttpStreamFactoryTest, DISABLED_OrphanedWebSocketStream) {
|
| WebSocketStreamCreateHelper create_helper;
|
| std::unique_ptr<HttpStreamRequest> request(
|
| session->http_stream_factory_for_websocket()
|
| - ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
|
| - ssl_config, ssl_config, &waiter,
|
| - &create_helper, BoundNetLog()));
|
| + ->RequestWebSocketHandshakeStream(
|
| + request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
|
| + &create_helper, NetLogWithSource()));
|
| waiter.WaitForStream();
|
| EXPECT_TRUE(waiter.stream_done());
|
| EXPECT_TRUE(nullptr == waiter.stream());
|
|
|