| 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 <algorithm> |
| 7 #include <limits> | 8 #include <limits> |
| 9 #include <string> |
| 10 #include <vector> |
| 8 | 11 |
| 9 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 13 #include "base/bind.h" |
| 11 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 12 #include "base/files/file_util_proxy.h" | 15 #include "base/files/file_util_proxy.h" |
| 13 #include "base/format_macros.h" | 16 #include "base/format_macros.h" |
| 14 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 15 #include "base/message_loop/message_loop_proxy.h" | 18 #include "base/message_loop/message_loop_proxy.h" |
| 16 #include "base/stl_util.h" | 19 #include "base/stl_util.h" |
| 17 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 item.path(), | 573 item.path(), |
| 571 item.offset() + additional_offset, | 574 item.offset() + additional_offset, |
| 572 item.expected_modification_time()); | 575 item.expected_modification_time()); |
| 573 break; | 576 break; |
| 574 case BlobData::Item::TYPE_FILE_FILESYSTEM: | 577 case BlobData::Item::TYPE_FILE_FILESYSTEM: |
| 575 reader = file_system_context_->CreateFileStreamReader( | 578 reader = file_system_context_->CreateFileStreamReader( |
| 576 storage::FileSystemURL( | 579 storage::FileSystemURL( |
| 577 file_system_context_->CrackURL( | 580 file_system_context_->CrackURL( |
| 578 item.filesystem_url())), | 581 item.filesystem_url())), |
| 579 item.offset() + additional_offset, | 582 item.offset() + additional_offset, |
| 583 item.length() - additional_offset, |
| 580 item.expected_modification_time()) | 584 item.expected_modification_time()) |
| 581 .release(); | 585 .release(); |
| 582 break; | 586 break; |
| 583 default: | 587 default: |
| 584 NOTREACHED(); | 588 NOTREACHED(); |
| 585 } | 589 } |
| 586 DCHECK(reader); | 590 DCHECK(reader); |
| 587 index_to_reader_[index] = reader; | 591 index_to_reader_[index] = reader; |
| 588 } | 592 } |
| 589 | 593 |
| 590 } // namespace storage | 594 } // namespace storage |
| OLD | NEW |