summaryrefslogtreecommitdiffstats
path: root/content/common/fileapi
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 14:32:43 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 14:32:43 +0000
commit9ff2b229efc1edb5497f018ad29f1233c2dd8061 (patch)
tree4444c57e41354c7f259547df8fba5bafe6a91bfc /content/common/fileapi
parentc6c43e39863b182ffffdda09cb07e11db2b62770 (diff)
downloadchromium_src-9ff2b229efc1edb5497f018ad29f1233c2dd8061.zip
chromium_src-9ff2b229efc1edb5497f018ad29f1233c2dd8061.tar.gz
chromium_src-9ff2b229efc1edb5497f018ad29f1233c2dd8061.tar.bz2
Factor out common Element struct from BlobData and ResourceRequestBody
BUG=110119 TEST=none Review URL: https://chromiumcodereview.appspot.com/10827414 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/fileapi')
-rw-r--r--content/common/fileapi/webblob_messages.h13
-rw-r--r--content/common/fileapi/webblobregistry_impl.cc6
2 files changed, 3 insertions, 16 deletions
diff --git a/content/common/fileapi/webblob_messages.h b/content/common/fileapi/webblob_messages.h
index 0f4688d..4ba4900 100644
--- a/content/common/fileapi/webblob_messages.h
+++ b/content/common/fileapi/webblob_messages.h
@@ -11,21 +11,8 @@
#define IPC_MESSAGE_START BlobMsgStart
-IPC_ENUM_TRAITS(webkit_blob::BlobData::Type)
-
-IPC_STRUCT_TRAITS_BEGIN(webkit_blob::BlobData::Item)
- IPC_STRUCT_TRAITS_MEMBER(type)
- IPC_STRUCT_TRAITS_MEMBER(data)
- IPC_STRUCT_TRAITS_MEMBER(file_path)
- IPC_STRUCT_TRAITS_MEMBER(blob_url)
- IPC_STRUCT_TRAITS_MEMBER(offset)
- IPC_STRUCT_TRAITS_MEMBER(length)
- IPC_STRUCT_TRAITS_MEMBER(expected_modification_time)
-IPC_STRUCT_TRAITS_END()
-
// Blob messages sent from the renderer to the browser.
-
// Registers a blob as being built.
IPC_MESSAGE_CONTROL1(BlobHostMsg_StartBuildingBlob,
GURL /* url */)
diff --git a/content/common/fileapi/webblobregistry_impl.cc b/content/common/fileapi/webblobregistry_impl.cc
index 9a80fb9..ba13a56 100644
--- a/content/common/fileapi/webblobregistry_impl.cc
+++ b/content/common/fileapi/webblobregistry_impl.cc
@@ -42,7 +42,7 @@ void WebBlobRegistryImpl::registerBlobURL(
if (data_item.data.size() == 0)
break;
if (data_item.data.size() < kLargeThresholdBytes) {
- item.SetToData(data_item.data.data(), data_item.data.size());
+ item.SetToBytes(data_item.data.data(), data_item.data.size());
child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
} else {
// We handle larger amounts of data via SharedMemory instead of
@@ -67,7 +67,7 @@ void WebBlobRegistryImpl::registerBlobURL(
}
case WebBlobData::Item::TypeFile:
if (data_item.length) {
- item.SetToFile(
+ item.SetToFilePathRange(
webkit_glue::WebStringToFilePath(data_item.filePath),
static_cast<uint64>(data_item.offset),
static_cast<uint64>(data_item.length),
@@ -77,7 +77,7 @@ void WebBlobRegistryImpl::registerBlobURL(
break;
case WebBlobData::Item::TypeBlob:
if (data_item.length) {
- item.SetToBlob(
+ item.SetToBlobUrlRange(
data_item.blobURL,
static_cast<uint64>(data_item.offset),
static_cast<uint64>(data_item.length));