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

Unified Diff: content/child/webblobregistry_impl.cc

Issue 810403004: [Storage] Blob Storage Refactoring pt 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: memory leak fixed Created 5 years, 11 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
Index: content/child/webblobregistry_impl.cc
diff --git a/content/child/webblobregistry_impl.cc b/content/child/webblobregistry_impl.cc
index d673c2a657fddc9eb044eda48b4762719e8fb607..171ac8bfc3c74263bebc24517cecea6a30c73001 100644
--- a/content/child/webblobregistry_impl.cc
+++ b/content/child/webblobregistry_impl.cc
@@ -56,7 +56,7 @@ void WebBlobRegistryImpl::registerBlobData(
}
case WebBlobData::Item::TypeFile:
if (data_item.length) {
- storage::BlobData::Item item;
+ storage::DataElement item;
item.SetToFilePathRange(
base::FilePath::FromUTF16Unsafe(data_item.filePath),
static_cast<uint64>(data_item.offset),
@@ -68,7 +68,7 @@ void WebBlobRegistryImpl::registerBlobData(
break;
case WebBlobData::Item::TypeBlob:
if (data_item.length) {
- storage::BlobData::Item item;
+ storage::DataElement item;
item.SetToBlobRange(
data_item.blobUUID.utf8(),
static_cast<uint64>(data_item.offset),
@@ -81,7 +81,7 @@ void WebBlobRegistryImpl::registerBlobData(
if (data_item.length) {
// We only support filesystem URL as of now.
DCHECK(GURL(data_item.fileSystemURL).SchemeIsFileSystem());
- storage::BlobData::Item item;
+ storage::DataElement item;
item.SetToFileSystemUrlRange(
data_item.fileSystemURL,
static_cast<uint64>(data_item.offset),
@@ -122,7 +122,7 @@ void WebBlobRegistryImpl::SendDataForBlob(const std::string& uuid_str,
if (data.size() == 0)
return;
if (data.size() < kLargeThresholdBytes) {
- storage::BlobData::Item item;
+ storage::DataElement item;
item.SetToBytes(data.data(), data.size());
sender_->Send(new BlobHostMsg_AppendBlobDataItem(uuid_str, item));
} else {
@@ -170,7 +170,7 @@ void WebBlobRegistryImpl::addDataToStream(const WebURL& url,
if (length == 0)
return;
if (length < kLargeThresholdBytes) {
- storage::BlobData::Item item;
+ storage::DataElement item;
item.SetToBytes(data, length);
sender_->Send(new StreamHostMsg_AppendBlobDataItem(url, item));
} else {

Powered by Google App Engine
This is Rietveld 408576698