OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/network/url_loader_impl.h" | 5 #include "content/network/url_loader_impl.h" |
6 | 6 |
7 #include "base/task_scheduler/post_task.h" | 7 #include "base/task_scheduler/post_task.h" |
8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/common/net_adapters.h" |
10 #include "content/common/url_loader_factory.mojom.h" | 11 #include "content/common/url_loader_factory.mojom.h" |
11 #include "content/network/net_adapters.h" | |
12 #include "content/network/network_context.h" | 12 #include "content/network/network_context.h" |
13 #include "content/public/common/referrer.h" | 13 #include "content/public/common/referrer.h" |
14 #include "content/public/common/resource_response.h" | 14 #include "content/public/common/resource_response.h" |
15 #include "net/base/elements_upload_data_stream.h" | 15 #include "net/base/elements_upload_data_stream.h" |
16 #include "net/base/load_flags.h" | 16 #include "net/base/load_flags.h" |
17 #include "net/base/upload_bytes_element_reader.h" | 17 #include "net/base/upload_bytes_element_reader.h" |
18 #include "net/base/upload_file_element_reader.h" | 18 #include "net/base/upload_file_element_reader.h" |
19 #include "net/url_request/url_request_context.h" | 19 #include "net/url_request/url_request_context.h" |
20 | 20 |
21 namespace content { | 21 namespace content { |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 ReadMore(); | 395 ReadMore(); |
396 } | 396 } |
397 | 397 |
398 void URLLoaderImpl::DeleteIfNeeded() { | 398 void URLLoaderImpl::DeleteIfNeeded() { |
399 bool has_data_pipe = pending_write_.get() || response_body_stream_.is_valid(); | 399 bool has_data_pipe = pending_write_.get() || response_body_stream_.is_valid(); |
400 if (!connected_ && !has_data_pipe) | 400 if (!connected_ && !has_data_pipe) |
401 delete this; | 401 delete this; |
402 } | 402 } |
403 | 403 |
404 } // namespace content | 404 } // namespace content |
OLD | NEW |