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/browser/blob/blob_url_request_job.h" | 5 #include "webkit/browser/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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
566 switch (item.type()) { | 566 switch (item.type()) { |
567 case BlobData::Item::TYPE_FILE: | 567 case BlobData::Item::TYPE_FILE: |
568 reader = FileStreamReader::CreateForLocalFile( | 568 reader = FileStreamReader::CreateForLocalFile( |
569 file_thread_proxy_.get(), | 569 file_thread_proxy_.get(), |
570 item.path(), | 570 item.path(), |
571 item.offset() + additional_offset, | 571 item.offset() + additional_offset, |
572 item.expected_modification_time()); | 572 item.expected_modification_time()); |
573 break; | 573 break; |
574 case BlobData::Item::TYPE_FILE_FILESYSTEM: | 574 case BlobData::Item::TYPE_FILE_FILESYSTEM: |
575 reader = file_system_context_->CreateFileStreamReader( | 575 reader = file_system_context_->CreateFileStreamReader( |
576 fileapi::FileSystemURL( | 576 fileapi::FileSystemURL( |
577 file_system_context_->CrackURL(item.filesystem_url())), | 577 file_system_context_->CrackURL( |
578 item.offset() + additional_offset, | 578 item.filesystem_url())), |
579 item.expected_modification_time()).release(); | 579 item.offset() + additional_offset, |
580 item.length() - additional_offset, | |
hashimoto
2014/08/22 06:53:42
BlobData::Item is typedef-ed to DataElement and Da
mtomasz
2014/08/25 03:32:31
This is a good point. However, int64 are used all
hashimoto
2014/09/01 11:01:01
Then could you fix crbug.com/406967 first, or impl
| |
581 item.expected_modification_time()) | |
582 .release(); | |
580 break; | 583 break; |
581 default: | 584 default: |
582 NOTREACHED(); | 585 NOTREACHED(); |
583 } | 586 } |
584 DCHECK(reader); | 587 DCHECK(reader); |
585 index_to_reader_[index] = reader; | 588 index_to_reader_[index] = reader; |
586 } | 589 } |
587 | 590 |
588 } // namespace webkit_blob | 591 } // namespace webkit_blob |
OLD | NEW |