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

Side by Side Diff: net/http/http_transaction_test_util.h

Issue 1006643002: Plumb connection attempts from (non-proxy) ConnectJobs to HttpNetworkTransaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 5 years, 7 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
« no previous file with comments | « net/http/http_transaction.h ('k') | net/http/http_transaction_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
7 7
8 #include "net/http/http_transaction.h" 8 #include "net/http/http_transaction.h"
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "net/base/io_buffer.h" 16 #include "net/base/io_buffer.h"
17 #include "net/base/load_flags.h" 17 #include "net/base/load_flags.h"
18 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
19 #include "net/base/request_priority.h" 19 #include "net/base/request_priority.h"
20 #include "net/base/test_completion_callback.h" 20 #include "net/base/test_completion_callback.h"
21 #include "net/disk_cache/disk_cache.h" 21 #include "net/disk_cache/disk_cache.h"
22 #include "net/http/http_cache.h" 22 #include "net/http/http_cache.h"
23 #include "net/http/http_request_info.h" 23 #include "net/http/http_request_info.h"
24 #include "net/http/http_response_headers.h" 24 #include "net/http/http_response_headers.h"
25 #include "net/http/http_response_info.h" 25 #include "net/http/http_response_info.h"
26 #include "net/log/net_log.h" 26 #include "net/log/net_log.h"
27 #include "net/socket/connection_attempts.h"
27 28
28 namespace net { 29 namespace net {
29 30
30 class HttpRequestHeaders; 31 class HttpRequestHeaders;
31 class IOBuffer; 32 class IOBuffer;
32 struct HttpRequestInfo; 33 struct HttpRequestInfo;
33 34
34 //----------------------------------------------------------------------------- 35 //-----------------------------------------------------------------------------
35 // mock transaction data 36 // mock transaction data
36 37
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 CreateHelper* create_helper) override; 212 CreateHelper* create_helper) override;
212 213
213 void SetBeforeNetworkStartCallback( 214 void SetBeforeNetworkStartCallback(
214 const BeforeNetworkStartCallback& callback) override; 215 const BeforeNetworkStartCallback& callback) override;
215 216
216 void SetBeforeProxyHeadersSentCallback( 217 void SetBeforeProxyHeadersSentCallback(
217 const BeforeProxyHeadersSentCallback& callback) override; 218 const BeforeProxyHeadersSentCallback& callback) override;
218 219
219 int ResumeNetworkStart() override; 220 int ResumeNetworkStart() override;
220 221
222 void GetConnectionAttempts(ConnectionAttempts* out) const override;
223
221 CreateHelper* websocket_handshake_stream_create_helper() { 224 CreateHelper* websocket_handshake_stream_create_helper() {
222 return websocket_handshake_stream_create_helper_; 225 return websocket_handshake_stream_create_helper_;
223 } 226 }
224 RequestPriority priority() const { return priority_; } 227 RequestPriority priority() const { return priority_; }
225 const HttpRequestInfo* request() const { return request_; } 228 const HttpRequestInfo* request() const { return request_; }
226 229
227 private: 230 private:
228 int StartInternal(const HttpRequestInfo* request, 231 int StartInternal(const HttpRequestInfo* request,
229 const CompletionCallback& callback, 232 const CompletionCallback& callback,
230 const BoundNetLog& net_log); 233 const BoundNetLog& net_log);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 314
312 //----------------------------------------------------------------------------- 315 //-----------------------------------------------------------------------------
313 // helpers 316 // helpers
314 317
315 // read the transaction completely 318 // read the transaction completely
316 int ReadTransaction(HttpTransaction* trans, std::string* result); 319 int ReadTransaction(HttpTransaction* trans, std::string* result);
317 320
318 } // namespace net 321 } // namespace net
319 322
320 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 323 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/http/http_transaction.h ('k') | net/http/http_transaction_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698