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

Side by Side Diff: content/child/resource_dispatcher_unittest.cc

Issue 2813243002: network service: pass PlzNavigate resulting data via mojo data pipe (Closed)
Patch Set: ahem Created 3 years, 8 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 | « content/child/resource_dispatcher.cc ('k') | content/child/url_loader_client_impl_unittest.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 (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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 ResourceDispatcher* dispatcher() { return dispatcher_.get(); } 223 ResourceDispatcher* dispatcher() { return dispatcher_.get(); }
224 224
225 int StartAsync(std::unique_ptr<ResourceRequest> request, 225 int StartAsync(std::unique_ptr<ResourceRequest> request,
226 ResourceRequestBodyImpl* request_body, 226 ResourceRequestBodyImpl* request_body,
227 TestRequestPeer::Context* peer_context) { 227 TestRequestPeer::Context* peer_context) {
228 std::unique_ptr<TestRequestPeer> peer( 228 std::unique_ptr<TestRequestPeer> peer(
229 new TestRequestPeer(dispatcher(), peer_context)); 229 new TestRequestPeer(dispatcher(), peer_context));
230 int request_id = dispatcher()->StartAsync( 230 int request_id = dispatcher()->StartAsync(
231 std::move(request), 0, nullptr, url::Origin(), std::move(peer), 231 std::move(request), 0, nullptr, url::Origin(), std::move(peer),
232 blink::WebURLRequest::LoadingIPCType::kChromeIPC, nullptr); 232 blink::WebURLRequest::LoadingIPCType::kChromeIPC, nullptr,
233 mojo::ScopedDataPipeConsumerHandle());
233 peer_context->request_id = request_id; 234 peer_context->request_id = request_id;
234 return request_id; 235 return request_id;
235 } 236 }
236 237
237 private: 238 private:
238 // Map of request IDs to shared memory. 239 // Map of request IDs to shared memory.
239 std::map<int, std::unique_ptr<base::SharedMemory>> shared_memory_map_; 240 std::map<int, std::unique_ptr<base::SharedMemory>> shared_memory_map_;
240 241
241 std::vector<IPC::Message> message_queue_; 242 std::vector<IPC::Message> message_queue_;
242 base::MessageLoop message_loop_; 243 base::MessageLoop message_loop_;
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 ResourceResponseHead response_head; 911 ResourceResponseHead response_head;
911 912
912 PerformTest(response_head); 913 PerformTest(response_head);
913 914
914 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); 915 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start);
915 EXPECT_EQ(base::TimeTicks(), 916 EXPECT_EQ(base::TimeTicks(),
916 response_info().load_timing.connect_timing.dns_start); 917 response_info().load_timing.connect_timing.dns_start);
917 } 918 }
918 919
919 } // namespace content 920 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/url_loader_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698