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

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

Issue 2695333002: Mojo C++ bindings: remove usage of AssociatedGroup from content/ (Closed)
Patch Set: . Created 3 years, 10 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.h » ('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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 ResourceDispatcher* dispatcher() { return dispatcher_.get(); } 230 ResourceDispatcher* dispatcher() { return dispatcher_.get(); }
231 231
232 int StartAsync(std::unique_ptr<ResourceRequest> request, 232 int StartAsync(std::unique_ptr<ResourceRequest> request,
233 ResourceRequestBodyImpl* request_body, 233 ResourceRequestBodyImpl* request_body,
234 TestRequestPeer::Context* peer_context) { 234 TestRequestPeer::Context* peer_context) {
235 std::unique_ptr<TestRequestPeer> peer( 235 std::unique_ptr<TestRequestPeer> peer(
236 new TestRequestPeer(dispatcher(), peer_context)); 236 new TestRequestPeer(dispatcher(), peer_context));
237 int request_id = dispatcher()->StartAsync( 237 int request_id = dispatcher()->StartAsync(
238 std::move(request), 0, nullptr, url::Origin(), std::move(peer), 238 std::move(request), 0, nullptr, url::Origin(), std::move(peer),
239 blink::WebURLRequest::LoadingIPCType::ChromeIPC, nullptr, nullptr); 239 blink::WebURLRequest::LoadingIPCType::ChromeIPC, nullptr);
240 peer_context->request_id = request_id; 240 peer_context->request_id = request_id;
241 return request_id; 241 return request_id;
242 } 242 }
243 243
244 private: 244 private:
245 // Map of request IDs to shared memory. 245 // Map of request IDs to shared memory.
246 std::map<int, std::unique_ptr<base::SharedMemory>> shared_memory_map_; 246 std::map<int, std::unique_ptr<base::SharedMemory>> shared_memory_map_;
247 247
248 std::vector<IPC::Message> message_queue_; 248 std::vector<IPC::Message> message_queue_;
249 base::MessageLoop message_loop_; 249 base::MessageLoop message_loop_;
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 ResourceResponseHead response_head; 945 ResourceResponseHead response_head;
946 946
947 PerformTest(response_head); 947 PerformTest(response_head);
948 948
949 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); 949 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start);
950 EXPECT_EQ(base::TimeTicks(), 950 EXPECT_EQ(base::TimeTicks(),
951 response_info().load_timing.connect_timing.dns_start); 951 response_info().load_timing.connect_timing.dns_start);
952 } 952 }
953 953
954 } // namespace content 954 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/url_loader_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698