summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 14:53:22 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 14:53:22 +0000
commit478df839eb3260d4b2602c7e6a8f5d6294213eef (patch)
tree05b56a1b1aebc91c6669e261c4336079cfd57e1c /content/common
parentdd2608624a1674faf2530e291dd3441bb83e04f7 (diff)
downloadchromium_src-478df839eb3260d4b2602c7e6a8f5d6294213eef.zip
chromium_src-478df839eb3260d4b2602c7e6a8f5d6294213eef.tar.gz
chromium_src-478df839eb3260d4b2602c7e6a8f5d6294213eef.tar.bz2
Revert "nss: revert encrypted and origin bound certificates support."
Screwed up git branches in that change. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/fileapi/webblobregistry_impl.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/content/common/fileapi/webblobregistry_impl.cc b/content/common/fileapi/webblobregistry_impl.cc
index 924e919..9a80fb9 100644
--- a/content/common/fileapi/webblobregistry_impl.cc
+++ b/content/common/fileapi/webblobregistry_impl.cc
@@ -39,6 +39,8 @@ void WebBlobRegistryImpl::registerBlobURL(
case WebBlobData::Item::TypeData: {
// WebBlobData does not allow partial data items.
DCHECK(!data_item.offset && data_item.length == -1);
+ if (data_item.data.size() == 0)
+ break;
if (data_item.data.size() < kLargeThresholdBytes) {
item.SetToData(data_item.data.data(), data_item.data.size());
child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
@@ -64,12 +66,14 @@ void WebBlobRegistryImpl::registerBlobURL(
break;
}
case WebBlobData::Item::TypeFile:
- item.SetToFile(
- webkit_glue::WebStringToFilePath(data_item.filePath),
- static_cast<uint64>(data_item.offset),
- static_cast<uint64>(data_item.length),
- base::Time::FromDoubleT(data_item.expectedModificationTime));
- child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
+ if (data_item.length) {
+ item.SetToFile(
+ webkit_glue::WebStringToFilePath(data_item.filePath),
+ static_cast<uint64>(data_item.offset),
+ static_cast<uint64>(data_item.length),
+ base::Time::FromDoubleT(data_item.expectedModificationTime));
+ child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
+ }
break;
case WebBlobData::Item::TypeBlob:
if (data_item.length) {
@@ -77,8 +81,8 @@ void WebBlobRegistryImpl::registerBlobURL(
data_item.blobURL,
static_cast<uint64>(data_item.offset),
static_cast<uint64>(data_item.length));
+ child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
}
- child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
break;
default:
NOTREACHED();