| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 switch (item.type()) { | 586 switch (item.type()) { |
| 587 case BlobData::Item::TYPE_FILE: | 587 case BlobData::Item::TYPE_FILE: |
| 588 reader = new LocalFileStreamReader( | 588 reader = new LocalFileStreamReader( |
| 589 file_thread_proxy_, | 589 file_thread_proxy_, |
| 590 item.path(), | 590 item.path(), |
| 591 item.offset() + additional_offset, | 591 item.offset() + additional_offset, |
| 592 item.expected_modification_time()); | 592 item.expected_modification_time()); |
| 593 break; | 593 break; |
| 594 case BlobData::Item::TYPE_FILE_FILESYSTEM: | 594 case BlobData::Item::TYPE_FILE_FILESYSTEM: |
| 595 reader = file_system_context_->CreateFileStreamReader( | 595 reader = file_system_context_->CreateFileStreamReader( |
| 596 fileapi::FileSystemURL(file_system_context_->CrackURL(item.url())), | 596 fileapi::FileSystemURL( |
| 597 file_system_context_->CrackURL(item.filesystem_url())), |
| 597 item.offset() + additional_offset, | 598 item.offset() + additional_offset, |
| 598 item.expected_modification_time()); | 599 item.expected_modification_time()); |
| 599 break; | 600 break; |
| 600 default: | 601 default: |
| 601 NOTREACHED(); | 602 NOTREACHED(); |
| 602 } | 603 } |
| 603 DCHECK(reader); | 604 DCHECK(reader); |
| 604 index_to_reader_[index] = reader; | 605 index_to_reader_[index] = reader; |
| 605 } | 606 } |
| 606 | 607 |
| 607 } // namespace webkit_blob | 608 } // namespace webkit_blob |
| OLD | NEW |