OLD | NEW |
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 "net/url_request/url_request_simple_job.h" | 5 #include "net/url_request/url_request_simple_job.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/task_scheduler/post_task.h" | 14 #include "base/task_scheduler/post_task.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "base/threading/worker_pool.h" | |
17 #include "net/base/io_buffer.h" | 16 #include "net/base/io_buffer.h" |
18 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
19 #include "net/http/http_request_headers.h" | 18 #include "net/http/http_request_headers.h" |
20 #include "net/http/http_util.h" | 19 #include "net/http/http_util.h" |
21 #include "net/url_request/url_request_status.h" | 20 #include "net/url_request/url_request_status.h" |
22 | 21 |
23 namespace net { | 22 namespace net { |
24 | 23 |
25 namespace { | 24 namespace { |
26 | 25 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 next_data_offset_ = byte_range_.first_byte_position(); | 136 next_data_offset_ = byte_range_.first_byte_position(); |
138 set_expected_content_size(byte_range_.last_byte_position() - | 137 set_expected_content_size(byte_range_.last_byte_position() - |
139 next_data_offset_ + 1); | 138 next_data_offset_ + 1); |
140 NotifyHeadersComplete(); | 139 NotifyHeadersComplete(); |
141 } else { | 140 } else { |
142 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, result)); | 141 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, result)); |
143 } | 142 } |
144 } | 143 } |
145 | 144 |
146 } // namespace net | 145 } // namespace net |
OLD | NEW |