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 "webkit/blob/blob_url_request_job.h" | 5 #include "webkit/blob/blob_url_request_job.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_util_proxy.h" | 9 #include "base/file_util_proxy.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 byte_range_.first_byte_position() + 1; | 215 byte_range_.first_byte_position() + 1; |
216 DCHECK_GE(remaining_bytes_, 0); | 216 DCHECK_GE(remaining_bytes_, 0); |
217 | 217 |
218 // Do the seek at the beginning of the request. | 218 // Do the seek at the beginning of the request. |
219 if (byte_range_.first_byte_position()) | 219 if (byte_range_.first_byte_position()) |
220 Seek(byte_range_.first_byte_position()); | 220 Seek(byte_range_.first_byte_position()); |
221 | 221 |
222 NotifySuccess(); | 222 NotifySuccess(); |
223 } | 223 } |
224 | 224 |
225 void BlobURLRequestJob::DidGetFileItemLength(size_t index, int result) { | 225 void BlobURLRequestJob::DidGetFileItemLength(size_t index, int64 result) { |
226 // Do nothing if we have encountered an error. | 226 // Do nothing if we have encountered an error. |
227 if (error_) | 227 if (error_) |
228 return; | 228 return; |
229 | 229 |
230 if (result == net::ERR_UPLOAD_FILE_CHANGED) { | 230 if (result == net::ERR_UPLOAD_FILE_CHANGED) { |
231 NotifyFailure(net::ERR_FILE_NOT_FOUND); | 231 NotifyFailure(net::ERR_FILE_NOT_FOUND); |
232 return; | 232 return; |
233 } else if (result < 0) { | 233 } else if (result < 0) { |
234 NotifyFailure(result); | 234 NotifyFailure(result); |
235 return; | 235 return; |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 file_thread_proxy_, | 528 file_thread_proxy_, |
529 item.file_path, | 529 item.file_path, |
530 item.offset, | 530 item.offset, |
531 item.expected_modification_time); | 531 item.expected_modification_time); |
532 } | 532 } |
533 DCHECK(index_to_reader_[index]); | 533 DCHECK(index_to_reader_[index]); |
534 return index_to_reader_[index]; | 534 return index_to_reader_[index]; |
535 } | 535 } |
536 | 536 |
537 } // namespace webkit_blob | 537 } // namespace webkit_blob |
OLD | NEW |