OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/url_loader_client_impl.h" | 5 #include "content/child/url_loader_client_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 int32_t request_id, | 55 int32_t request_id, |
56 uint32_t options, | 56 uint32_t options, |
57 const ResourceRequest& url_request, | 57 const ResourceRequest& url_request, |
58 mojom::URLLoaderClientPtr client) override { | 58 mojom::URLLoaderClientPtr client) override { |
59 url_loader_client_ = std::move(client); | 59 url_loader_client_ = std::move(client); |
60 } | 60 } |
61 | 61 |
62 void SyncLoad(int32_t routing_id, | 62 void SyncLoad(int32_t routing_id, |
63 int32_t request_id, | 63 int32_t request_id, |
64 const ResourceRequest& request, | 64 const ResourceRequest& request, |
65 const SyncLoadCallback& callback) override { | 65 SyncLoadCallback callback) override { |
66 NOTREACHED(); | 66 NOTREACHED(); |
67 } | 67 } |
68 | 68 |
69 static MojoCreateDataPipeOptions DataPipeOptions() { | 69 static MojoCreateDataPipeOptions DataPipeOptions() { |
70 MojoCreateDataPipeOptions options; | 70 MojoCreateDataPipeOptions options; |
71 options.struct_size = sizeof(MojoCreateDataPipeOptions); | 71 options.struct_size = sizeof(MojoCreateDataPipeOptions); |
72 options.flags = MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE; | 72 options.flags = MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE; |
73 options.element_num_bytes = 1; | 73 options.element_num_bytes = 1; |
74 options.capacity_num_bytes = 4096; | 74 options.capacity_num_bytes = 4096; |
75 return options; | 75 return options; |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 518 |
519 dispatcher_->SetDefersLoading(request_id_, false); | 519 dispatcher_->SetDefersLoading(request_id_, false); |
520 base::RunLoop().RunUntilIdle(); | 520 base::RunLoop().RunUntilIdle(); |
521 EXPECT_TRUE(request_peer_context_.received_response); | 521 EXPECT_TRUE(request_peer_context_.received_response); |
522 EXPECT_TRUE(request_peer_context_.complete); | 522 EXPECT_TRUE(request_peer_context_.complete); |
523 EXPECT_EQ(4, request_peer_context_.total_encoded_data_length); | 523 EXPECT_EQ(4, request_peer_context_.total_encoded_data_length); |
524 EXPECT_FALSE(request_peer_context_.cancelled); | 524 EXPECT_FALSE(request_peer_context_.cancelled); |
525 } | 525 } |
526 | 526 |
527 } // namespace content | 527 } // namespace content |
OLD | NEW |