OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/failing_http_transaction_factory.h" | 5 #include "net/http/failing_http_transaction_factory.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "net/base/load_timing_info.h" | 15 #include "net/base/load_timing_info.h" |
16 #include "net/base/net_error_details.h" | 16 #include "net/base/net_error_details.h" |
17 #include "net/base/upload_progress.h" | |
18 #include "net/http/http_response_info.h" | 17 #include "net/http/http_response_info.h" |
19 #include "net/socket/connection_attempts.h" | 18 #include "net/socket/connection_attempts.h" |
20 | 19 |
21 namespace net { | 20 namespace net { |
22 | 21 |
23 class AuthCredentials; | 22 class AuthCredentials; |
24 class BoundNetLog; | 23 class BoundNetLog; |
25 class HttpRequestHeaders; | 24 class HttpRequestHeaders; |
26 class IOBuffer; | 25 class IOBuffer; |
27 class SSLPrivateKey; | 26 class SSLPrivateKey; |
(...skipping 23 matching lines...) Expand all Loading... |
51 int Read(IOBuffer* buf, | 50 int Read(IOBuffer* buf, |
52 int buf_len, | 51 int buf_len, |
53 const CompletionCallback& callback) override; | 52 const CompletionCallback& callback) override; |
54 void StopCaching() override; | 53 void StopCaching() override; |
55 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; | 54 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; |
56 int64_t GetTotalReceivedBytes() const override; | 55 int64_t GetTotalReceivedBytes() const override; |
57 int64_t GetTotalSentBytes() const override; | 56 int64_t GetTotalSentBytes() const override; |
58 void DoneReading() override; | 57 void DoneReading() override; |
59 const HttpResponseInfo* GetResponseInfo() const override; | 58 const HttpResponseInfo* GetResponseInfo() const override; |
60 LoadState GetLoadState() const override; | 59 LoadState GetLoadState() const override; |
61 UploadProgress GetUploadProgress() const override; | |
62 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; | 60 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; |
63 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 61 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
64 bool GetRemoteEndpoint(IPEndPoint* endpoint) const override; | 62 bool GetRemoteEndpoint(IPEndPoint* endpoint) const override; |
65 void PopulateNetErrorDetails(NetErrorDetails* details) const override; | 63 void PopulateNetErrorDetails(NetErrorDetails* details) const override; |
66 void SetPriority(RequestPriority priority) override; | 64 void SetPriority(RequestPriority priority) override; |
67 void SetWebSocketHandshakeStreamCreateHelper( | 65 void SetWebSocketHandshakeStreamCreateHelper( |
68 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; | 66 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; |
69 void SetBeforeNetworkStartCallback( | 67 void SetBeforeNetworkStartCallback( |
70 const BeforeNetworkStartCallback& callback) override; | 68 const BeforeNetworkStartCallback& callback) override; |
71 void SetBeforeHeadersSentCallback( | 69 void SetBeforeHeadersSentCallback( |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 138 } |
141 | 139 |
142 const HttpResponseInfo* FailingHttpTransaction::GetResponseInfo() const { | 140 const HttpResponseInfo* FailingHttpTransaction::GetResponseInfo() const { |
143 return &response_; | 141 return &response_; |
144 } | 142 } |
145 | 143 |
146 LoadState FailingHttpTransaction::GetLoadState() const { | 144 LoadState FailingHttpTransaction::GetLoadState() const { |
147 return LOAD_STATE_IDLE; | 145 return LOAD_STATE_IDLE; |
148 } | 146 } |
149 | 147 |
150 UploadProgress FailingHttpTransaction::GetUploadProgress() const { | |
151 return UploadProgress(); | |
152 } | |
153 | |
154 void FailingHttpTransaction::SetQuicServerInfo( | 148 void FailingHttpTransaction::SetQuicServerInfo( |
155 QuicServerInfo* quic_server_info) { | 149 QuicServerInfo* quic_server_info) { |
156 } | 150 } |
157 | 151 |
158 bool FailingHttpTransaction::GetLoadTimingInfo( | 152 bool FailingHttpTransaction::GetLoadTimingInfo( |
159 LoadTimingInfo* load_timing_info) const { | 153 LoadTimingInfo* load_timing_info) const { |
160 return false; | 154 return false; |
161 } | 155 } |
162 | 156 |
163 bool FailingHttpTransaction::GetRemoteEndpoint(IPEndPoint* endpoint) const { | 157 bool FailingHttpTransaction::GetRemoteEndpoint(IPEndPoint* endpoint) const { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 207 |
214 HttpCache* FailingHttpTransactionFactory::GetCache() { | 208 HttpCache* FailingHttpTransactionFactory::GetCache() { |
215 return NULL; | 209 return NULL; |
216 } | 210 } |
217 | 211 |
218 HttpNetworkSession* FailingHttpTransactionFactory::GetSession() { | 212 HttpNetworkSession* FailingHttpTransactionFactory::GetSession() { |
219 return session_; | 213 return session_; |
220 } | 214 } |
221 | 215 |
222 } // namespace net | 216 } // namespace net |
OLD | NEW |