Chromium Code Reviews| Index: webkit/blob/blob_url_request_job.cc |
| =================================================================== |
| --- webkit/blob/blob_url_request_job.cc (revision 103169) |
| +++ webkit/blob/blob_url_request_job.cc (working copy) |
| @@ -137,10 +137,10 @@ |
| // Note that the expected modification time from WebKit is based on |
| // time_t precision. So we have to convert both to time_t to compare. |
| const BlobData::Item& item = blob_data_->items().at(item_index_); |
| - DCHECK(item.type() == BlobData::TYPE_FILE); |
| + DCHECK(item.type == BlobData::TYPE_FILE); |
| - if (!item.expected_modification_time().is_null() && |
| - item.expected_modification_time().ToTimeT() != |
| + if (!item.expected_modification_time.is_null() && |
| + item.expected_modification_time.ToTimeT() != |
| file_info.last_modified.ToTimeT()) { |
| NotifyFailure(net::ERR_FILE_NOT_FOUND); |
| return; |
| @@ -148,7 +148,7 @@ |
| // If item length is -1, we need to use the file size being resolved |
| // in the real time. |
| - int64 item_length = static_cast<int64>(item.length()); |
| + int64 item_length = static_cast<int64>(item.length); |
| if (item_length == -1) |
| item_length = file_info.size; |
| @@ -164,11 +164,11 @@ |
| void BlobURLRequestJob::CountSize() { |
| for (; item_index_ < blob_data_->items().size(); ++item_index_) { |
| const BlobData::Item& item = blob_data_->items().at(item_index_); |
| - int64 item_length = static_cast<int64>(item.length()); |
| + int64 item_length = static_cast<int64>(item.length); |
| // If there is a file item, do the resolving. |
| - if (item.type() == BlobData::TYPE_FILE) { |
| - ResolveFile(item.file_path()); |
| + if (item.type == BlobData::TYPE_FILE) { |
| + ResolveFile(item.file_path); |
| return; |
| } |
| @@ -288,7 +288,7 @@ |
| // Do the reading. |
| const BlobData::Item& item = blob_data_->items().at(item_index_); |
| - switch (item.type()) { |
| + switch (item.type) { |
| case BlobData::TYPE_DATA: |
| return ReadBytes(item); |
| case BlobData::TYPE_FILE: |
| @@ -303,7 +303,7 @@ |
| DCHECK(read_buf_remaining_bytes_ >= bytes_to_read_); |
| memcpy(read_buf_->data() + read_buf_offset_, |
| - &item.data().at(0) + item.offset() + current_item_offset_, |
| + &item.data.at(0) + item.offset + current_item_offset_, |
| bytes_to_read_); |
| AdvanceBytesRead(bytes_to_read_); |
| @@ -316,7 +316,7 @@ |
| return ReadFile(item); |
| base::FileUtilProxy::CreateOrOpen( |
| - file_thread_proxy_, item.file_path(), kFileOpenFlags, |
| + file_thread_proxy_, item.file_path, kFileOpenFlags, |
| callback_factory_.NewCallback(&BlobURLRequestJob::DidOpen)); |
| SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0)); |
| return false; |
| @@ -337,7 +337,7 @@ |
| { |
| // stream_.Seek() blocks the IO thread, see http://crbug.com/75548. |
|
michaeln
2011/09/29 19:45:01
might be nice to do the seek on the filethread pri
|
| base::ThreadRestrictions::ScopedAllowIO allow_io; |
| - int64 offset = current_item_offset_ + static_cast<int64>(item.offset()); |
| + int64 offset = current_item_offset_ + static_cast<int64>(item.offset); |
| if (offset > 0 && offset != stream_->Seek(net::FROM_BEGIN, offset)) { |
| NotifyFailure(net::ERR_FAILED); |
| return; |