Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: webkit/blob/blob_url_request_job.cc

Issue 7974011: Break large blobs into multiple ipcs during creation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/blob/blob_storage_controller_unittest.cc ('k') | webkit/blob/blob_url_request_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/blob/blob_url_request_job.cc
===================================================================
--- webkit/blob/blob_url_request_job.cc (revision 105887)
+++ webkit/blob/blob_url_request_job.cc (working copy)
@@ -138,10 +138,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;
@@ -149,7 +149,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;
@@ -165,11 +165,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;
}
@@ -289,7 +289,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:
@@ -304,7 +304,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_);
@@ -317,7 +317,7 @@
return ReadFile(item);
base::FileUtilProxy::CreateOrOpen(
- file_thread_proxy_, item.file_path(), kFileOpenFlags,
+ file_thread_proxy_, item.file_path, kFileOpenFlags,
base::Bind(&BlobURLRequestJob::DidOpen, weak_factory_.GetWeakPtr()));
SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
return false;
@@ -338,7 +338,7 @@
{
// stream_.Seek() blocks the IO thread, see http://crbug.com/75548.
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;
« no previous file with comments | « webkit/blob/blob_storage_controller_unittest.cc ('k') | webkit/blob/blob_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698