| 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 switch (item.type()) { | 555 switch (item.type()) { |
| 556 case BlobData::Item::TYPE_FILE: | 556 case BlobData::Item::TYPE_FILE: |
| 557 reader = new LocalFileStreamReader( | 557 reader = new LocalFileStreamReader( |
| 558 file_thread_proxy_, | 558 file_thread_proxy_, |
| 559 item.path(), | 559 item.path(), |
| 560 item.offset() + additional_offset, | 560 item.offset() + additional_offset, |
| 561 item.expected_modification_time()); | 561 item.expected_modification_time()); |
| 562 break; | 562 break; |
| 563 case BlobData::Item::TYPE_FILE_FILESYSTEM: | 563 case BlobData::Item::TYPE_FILE_FILESYSTEM: |
| 564 reader = file_system_context_->CreateFileStreamReader( | 564 reader = file_system_context_->CreateFileStreamReader( |
| 565 fileapi::FileSystemURL(item.url()), | 565 fileapi::FileSystemURL(file_system_context_->CrackURL(item.url())), |
| 566 item.offset() + additional_offset, | 566 item.offset() + additional_offset, |
| 567 item.expected_modification_time()); | 567 item.expected_modification_time()); |
| 568 break; | 568 break; |
| 569 default: | 569 default: |
| 570 NOTREACHED(); | 570 NOTREACHED(); |
| 571 } | 571 } |
| 572 DCHECK(reader); | 572 DCHECK(reader); |
| 573 index_to_reader_[index] = reader; | 573 index_to_reader_[index] = reader; |
| 574 } | 574 } |
| 575 | 575 |
| 576 } // namespace webkit_blob | 576 } // namespace webkit_blob |
| OLD | NEW |