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

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

Issue 2506303002: Revert of Add a NetworkQualityEstimator to TestURLRequestContext. (Closed)
Patch Set: Created 4 years, 1 month 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
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 <stdint.h> 10 #include <stdint.h>
11 11
12 #include <string> 12 #include <string>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "base/time/time.h"
19 #include "net/base/io_buffer.h" 18 #include "net/base/io_buffer.h"
20 #include "net/base/load_flags.h" 19 #include "net/base/load_flags.h"
21 #include "net/base/net_error_details.h" 20 #include "net/base/net_error_details.h"
22 #include "net/base/net_errors.h" 21 #include "net/base/net_errors.h"
23 #include "net/base/request_priority.h" 22 #include "net/base/request_priority.h"
24 #include "net/base/test_completion_callback.h" 23 #include "net/base/test_completion_callback.h"
25 #include "net/disk_cache/disk_cache.h" 24 #include "net/disk_cache/disk_cache.h"
26 #include "net/http/http_cache.h" 25 #include "net/http/http_cache.h"
27 #include "net/http/http_request_info.h" 26 #include "net/http/http_request_info.h"
28 #include "net/http/http_response_headers.h" 27 #include "net/http/http_response_headers.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 int64_t sent_bytes_; 273 int64_t sent_bytes_;
275 274
276 // NetLog ID of the fake / non-existent underlying socket used by the 275 // NetLog ID of the fake / non-existent underlying socket used by the
277 // connection. Requires Start() be passed a NetLogWithSource with a real 276 // connection. Requires Start() be passed a NetLogWithSource with a real
278 // NetLog to 277 // NetLog to
279 // be initialized. 278 // be initialized.
280 unsigned int socket_log_id_; 279 unsigned int socket_log_id_;
281 280
282 bool done_reading_called_; 281 bool done_reading_called_;
283 282
284 base::TimeTicks start_time_;
285
286 base::WeakPtrFactory<MockNetworkTransaction> weak_factory_; 283 base::WeakPtrFactory<MockNetworkTransaction> weak_factory_;
287 284
288 }; 285 };
289 286
290 class MockNetworkLayer : public HttpTransactionFactory, 287 class MockNetworkLayer : public HttpTransactionFactory,
291 public base::SupportsWeakPtr<MockNetworkLayer> { 288 public base::SupportsWeakPtr<MockNetworkLayer> {
292 public: 289 public:
293 MockNetworkLayer(); 290 MockNetworkLayer();
294 ~MockNetworkLayer() override; 291 ~MockNetworkLayer() override;
295 292
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 349
353 //----------------------------------------------------------------------------- 350 //-----------------------------------------------------------------------------
354 // helpers 351 // helpers
355 352
356 // read the transaction completely 353 // read the transaction completely
357 int ReadTransaction(HttpTransaction* trans, std::string* result); 354 int ReadTransaction(HttpTransaction* trans, std::string* result);
358 355
359 } // namespace net 356 } // namespace net
360 357
361 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 358 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW
« no previous file with comments | « content/browser/android/url_request_content_job_unittest.cc ('k') | net/http/http_transaction_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698