| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 333 |
| 334 ResourceDispatcher* dispatcher() { return dispatcher_.get(); } | 334 ResourceDispatcher* dispatcher() { return dispatcher_.get(); } |
| 335 | 335 |
| 336 int StartAsync(std::unique_ptr<ResourceRequest> request, | 336 int StartAsync(std::unique_ptr<ResourceRequest> request, |
| 337 ResourceRequestBodyImpl* request_body, | 337 ResourceRequestBodyImpl* request_body, |
| 338 TestRequestPeer::Context* peer_context) { | 338 TestRequestPeer::Context* peer_context) { |
| 339 std::unique_ptr<TestRequestPeer> peer( | 339 std::unique_ptr<TestRequestPeer> peer( |
| 340 new TestRequestPeer(dispatcher(), peer_context)); | 340 new TestRequestPeer(dispatcher(), peer_context)); |
| 341 int request_id = dispatcher()->StartAsync( | 341 int request_id = dispatcher()->StartAsync( |
| 342 std::move(request), 0, nullptr, GURL(), std::move(peer), | 342 std::move(request), 0, nullptr, GURL(), std::move(peer), |
| 343 blink::WebURLRequest::LoadingIPCType::ChromeIPC, nullptr); | 343 blink::WebURLRequest::LoadingIPCType::ChromeIPC, nullptr, nullptr); |
| 344 peer_context->request_id = request_id; | 344 peer_context->request_id = request_id; |
| 345 return request_id; | 345 return request_id; |
| 346 } | 346 } |
| 347 | 347 |
| 348 private: | 348 private: |
| 349 // Map of request IDs to shared memory. | 349 // Map of request IDs to shared memory. |
| 350 std::map<int, std::unique_ptr<base::SharedMemory>> shared_memory_map_; | 350 std::map<int, std::unique_ptr<base::SharedMemory>> shared_memory_map_; |
| 351 | 351 |
| 352 std::vector<IPC::Message> message_queue_; | 352 std::vector<IPC::Message> message_queue_; |
| 353 base::MessageLoop message_loop_; | 353 base::MessageLoop message_loop_; |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 ResourceResponseHead response_head; | 1049 ResourceResponseHead response_head; |
| 1050 | 1050 |
| 1051 PerformTest(response_head); | 1051 PerformTest(response_head); |
| 1052 | 1052 |
| 1053 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); | 1053 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); |
| 1054 EXPECT_EQ(base::TimeTicks(), | 1054 EXPECT_EQ(base::TimeTicks(), |
| 1055 response_info().load_timing.connect_timing.dns_start); | 1055 response_info().load_timing.connect_timing.dns_start); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 } // namespace content | 1058 } // namespace content |
| OLD | NEW |