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

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

Issue 2448353002: [BlobAsync] Moving async handling into BlobStorageContext & quota out. (Closed)
Patch Set: comments from Marijn Created 4 years, 1 month 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..b564fd45a15123234b0a52c5c147fe9772b6af4a 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 <= limits_.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, limits_.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