| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <math.h> // ceil | 7 #include <math.h> // ceil |
| 8 #include <stdarg.h> | 8 #include <stdarg.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 12699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12710 } | 12710 } |
| 12711 | 12711 |
| 12712 void SetPriority(RequestPriority priority) override { priority_ = priority; } | 12712 void SetPriority(RequestPriority priority) override { priority_ = priority; } |
| 12713 | 12713 |
| 12714 bool was_npn_negotiated() const override { return false; } | 12714 bool was_npn_negotiated() const override { return false; } |
| 12715 | 12715 |
| 12716 NextProto protocol_negotiated() const override { return kProtoUnknown; } | 12716 NextProto protocol_negotiated() const override { return kProtoUnknown; } |
| 12717 | 12717 |
| 12718 bool using_spdy() const override { return false; } | 12718 bool using_spdy() const override { return false; } |
| 12719 | 12719 |
| 12720 const ClientSocketHandle::ConnectionAttempts& connection_attempts() |
| 12721 const override { |
| 12722 static ClientSocketHandle::ConnectionAttempts no_attempts; |
| 12723 return no_attempts; |
| 12724 } |
| 12725 |
| 12720 private: | 12726 private: |
| 12721 RequestPriority priority_; | 12727 RequestPriority priority_; |
| 12722 HttpStreamRequest::Delegate* const delegate_; | 12728 HttpStreamRequest::Delegate* const delegate_; |
| 12723 WebSocketHandshakeStreamBase::CreateHelper* websocket_stream_create_helper_; | 12729 WebSocketHandshakeStreamBase::CreateHelper* websocket_stream_create_helper_; |
| 12724 | 12730 |
| 12725 DISALLOW_COPY_AND_ASSIGN(FakeStreamRequest); | 12731 DISALLOW_COPY_AND_ASSIGN(FakeStreamRequest); |
| 12726 }; | 12732 }; |
| 12727 | 12733 |
| 12728 // Fake HttpStreamFactory that vends FakeStreamRequests. | 12734 // Fake HttpStreamFactory that vends FakeStreamRequests. |
| 12729 class FakeStreamFactory : public HttpStreamFactory { | 12735 class FakeStreamFactory : public HttpStreamFactory { |
| (...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13854 ASSERT_TRUE(response); | 13860 ASSERT_TRUE(response); |
| 13855 ASSERT_TRUE(response->headers.get()); | 13861 ASSERT_TRUE(response->headers.get()); |
| 13856 | 13862 |
| 13857 EXPECT_EQ(101, response->headers->response_code()); | 13863 EXPECT_EQ(101, response->headers->response_code()); |
| 13858 | 13864 |
| 13859 trans.reset(); | 13865 trans.reset(); |
| 13860 session->CloseAllConnections(); | 13866 session->CloseAllConnections(); |
| 13861 } | 13867 } |
| 13862 | 13868 |
| 13863 } // namespace net | 13869 } // namespace net |
| OLD | NEW |