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/browser/loader/async_resource_handler.h" | 5 #include "content/browser/loader/async_resource_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 false, // has_user_gesture | 182 false, // has_user_gesture |
183 false, // enable load timing | 183 false, // enable load timing |
184 false, // enable upload progress | 184 false, // enable upload progress |
185 false, // do_not_prompt_for_login | 185 false, // do_not_prompt_for_login |
186 blink::WebReferrerPolicyDefault, // referrer_policy | 186 blink::WebReferrerPolicyDefault, // referrer_policy |
187 blink::WebPageVisibilityStateVisible, // visibility_state | 187 blink::WebPageVisibilityStateVisible, // visibility_state |
188 resource_context_.get(), // context | 188 resource_context_.get(), // context |
189 false, // report_raw_headers | 189 false, // report_raw_headers |
190 true, // is_async | 190 true, // is_async |
191 PREVIEWS_OFF, // previews_state | 191 PREVIEWS_OFF, // previews_state |
192 std::string(), // original_headers | |
193 nullptr, // body | 192 nullptr, // body |
194 false); // initiated_in_secure_context | 193 false); // initiated_in_secure_context |
195 info->AssociateWithRequest(request.get()); | 194 info->AssociateWithRequest(request.get()); |
196 std::unique_ptr<AsyncResourceHandler> handler = | 195 std::unique_ptr<AsyncResourceHandler> handler = |
197 base::MakeUnique<AsyncResourceHandler>(request.get(), &rdh_); | 196 base::MakeUnique<AsyncResourceHandler>(request.get(), &rdh_); |
198 loader_ = base::MakeUnique<ResourceLoader>( | 197 loader_ = base::MakeUnique<ResourceLoader>( |
199 std::move(request), std::move(handler), this); | 198 std::move(request), std::move(handler), this); |
200 } | 199 } |
201 | 200 |
202 void StartRequestAndWaitWithResponseDataSize(size_t response_data_size) { | 201 void StartRequestAndWaitWithResponseDataSize(size_t response_data_size) { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 ResourceRequestCompletionStatus completion_status = | 327 ResourceRequestCompletionStatus completion_status = |
329 std::get<1>(completion_params); | 328 std::get<1>(completion_params); |
330 EXPECT_EQ(TotalReceivedBytes(kDataSize), | 329 EXPECT_EQ(TotalReceivedBytes(kDataSize), |
331 completion_status.encoded_data_length); | 330 completion_status.encoded_data_length); |
332 EXPECT_EQ(kDataSize, completion_status.encoded_body_length); | 331 EXPECT_EQ(kDataSize, completion_status.encoded_body_length); |
333 } | 332 } |
334 | 333 |
335 } // namespace | 334 } // namespace |
336 | 335 |
337 } // namespace content | 336 } // namespace content |
OLD | NEW |