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

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

Issue 2038813003: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 6 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/web_url_loader_impl.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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698