| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/child/resource_dispatcher.h" | 5 #include "content/child/resource_dispatcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 request_info->routing_id = 0; | 310 request_info->routing_id = 0; |
| 311 request_info->download_to_file = download_to_file; | 311 request_info->download_to_file = download_to_file; |
| 312 RequestExtraData extra_data; | 312 RequestExtraData extra_data; |
| 313 | 313 |
| 314 return request_info; | 314 return request_info; |
| 315 } | 315 } |
| 316 | 316 |
| 317 ResourceDispatcher* dispatcher() { return dispatcher_.get(); } | 317 ResourceDispatcher* dispatcher() { return dispatcher_.get(); } |
| 318 | 318 |
| 319 int StartAsync(const RequestInfo& request_info, | 319 int StartAsync(const RequestInfo& request_info, |
| 320 ResourceRequestBody* request_body, | 320 ResourceRequestBodyImpl* request_body, |
| 321 TestRequestPeer::Context* peer_context) { | 321 TestRequestPeer::Context* peer_context) { |
| 322 std::unique_ptr<TestRequestPeer> peer( | 322 std::unique_ptr<TestRequestPeer> peer( |
| 323 new TestRequestPeer(dispatcher(), peer_context)); | 323 new TestRequestPeer(dispatcher(), peer_context)); |
| 324 int request_id = | 324 int request_id = |
| 325 dispatcher()->StartAsync(request_info, request_body, std::move(peer)); | 325 dispatcher()->StartAsync(request_info, request_body, std::move(peer)); |
| 326 peer_context->request_id = request_id; | 326 peer_context->request_id = request_id; |
| 327 return request_id; | 327 return request_id; |
| 328 } | 328 } |
| 329 | 329 |
| 330 private: | 330 private: |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 ResourceResponseHead response_head; | 896 ResourceResponseHead response_head; |
| 897 | 897 |
| 898 PerformTest(response_head); | 898 PerformTest(response_head); |
| 899 | 899 |
| 900 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); | 900 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); |
| 901 EXPECT_EQ(base::TimeTicks(), | 901 EXPECT_EQ(base::TimeTicks(), |
| 902 response_info().load_timing.connect_timing.dns_start); | 902 response_info().load_timing.connect_timing.dns_start); |
| 903 } | 903 } |
| 904 | 904 |
| 905 } // namespace content | 905 } // namespace content |
| OLD | NEW |