OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 *response = sync_load_response_; | 75 *response = sync_load_response_; |
76 } | 76 } |
77 | 77 |
78 int StartAsync( | 78 int StartAsync( |
79 std::unique_ptr<ResourceRequest> request, | 79 std::unique_ptr<ResourceRequest> request, |
80 int routing_id, | 80 int routing_id, |
81 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner, | 81 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner, |
82 const url::Origin& frame_origin, | 82 const url::Origin& frame_origin, |
83 std::unique_ptr<RequestPeer> peer, | 83 std::unique_ptr<RequestPeer> peer, |
84 blink::WebURLRequest::LoadingIPCType ipc_type, | 84 blink::WebURLRequest::LoadingIPCType ipc_type, |
85 mojom::URLLoaderFactory* url_loader_factory) override { | 85 mojom::URLLoaderFactory* url_loader_factory, |
| 86 mojo::ScopedDataPipeConsumerHandle consumer_handle) override { |
86 EXPECT_FALSE(peer_); | 87 EXPECT_FALSE(peer_); |
87 peer_ = std::move(peer); | 88 peer_ = std::move(peer); |
88 url_ = request->url; | 89 url_ = request->url; |
89 stream_url_ = request->resource_body_stream_url; | 90 stream_url_ = request->resource_body_stream_url; |
90 return 1; | 91 return 1; |
91 } | 92 } |
92 | 93 |
93 void Cancel(int request_id) override { | 94 void Cancel(int request_id) override { |
94 EXPECT_FALSE(canceled_); | 95 EXPECT_FALSE(canceled_); |
95 canceled_ = true; | 96 canceled_ = true; |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 int64_t encoded_body_length = 0; | 687 int64_t encoded_body_length = 0; |
687 client()->loader()->LoadSynchronously( | 688 client()->loader()->LoadSynchronously( |
688 request, response, error, data, encoded_data_length, encoded_body_length); | 689 request, response, error, data, encoded_data_length, encoded_body_length); |
689 | 690 |
690 EXPECT_EQ(kEncodedBodyLength, encoded_body_length); | 691 EXPECT_EQ(kEncodedBodyLength, encoded_body_length); |
691 EXPECT_EQ(kEncodedDataLength, encoded_data_length); | 692 EXPECT_EQ(kEncodedDataLength, encoded_data_length); |
692 } | 693 } |
693 | 694 |
694 } // namespace | 695 } // namespace |
695 } // namespace content | 696 } // namespace content |
OLD | NEW |