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

Unified Diff: content/child/blob_storage/webblobregistry_impl.cc

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: half of comments Created 4 years, 4 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/blob_storage/webblobregistry_impl.cc
diff --git a/content/child/blob_storage/webblobregistry_impl.cc b/content/child/blob_storage/webblobregistry_impl.cc
index ba07709c64d12dc2e53012bd9a60d0f00b1391ad..3f0983fa4ca9973ff418e80f549c9d3048963731 100644
--- a/content/child/blob_storage/webblobregistry_impl.cc
+++ b/content/child/blob_storage/webblobregistry_impl.cc
@@ -19,7 +19,6 @@
#include "content/child/child_thread_impl.h"
#include "content/child/thread_safe_sender.h"
#include "content/common/fileapi/webblob_messages.h"
-#include "storage/common/blob_storage/blob_storage_constants.h"
#include "third_party/WebKit/public/platform/FilePathConversion.h"
#include "third_party/WebKit/public/platform/WebBlobData.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -139,7 +138,7 @@ void WebBlobRegistryImpl::addDataToStream(const WebURL& url,
DCHECK(ChildThreadImpl::current());
if (length == 0)
return;
- if (length < storage::kBlobStorageIPCThresholdBytes) {
+ if (length <= quotas_.max_ipc_memory_size) {
DataElement item;
item.SetToBytes(data, length);
sender_->Send(new StreamHostMsg_AppendBlobDataItem(url, item));
@@ -147,7 +146,7 @@ void WebBlobRegistryImpl::addDataToStream(const WebURL& url,
// We handle larger amounts of data via SharedMemory instead of
// writing it directly to the IPC channel.
size_t shared_memory_size =
- std::min(length, storage::kBlobStorageMaxSharedMemoryBytes);
+ std::min(length, quotas_.max_shared_memory_size);
std::unique_ptr<base::SharedMemory> shared_memory(
ChildThreadImpl::AllocateSharedMemory(shared_memory_size,
sender_.get(), nullptr));

Powered by Google App Engine
This is Rietveld 408576698