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

Unified Diff: storage/browser/blob/blob_async_transport_request_builder.cc

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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: storage/browser/blob/blob_async_transport_request_builder.cc
diff --git a/storage/browser/blob/blob_async_transport_request_builder.cc b/storage/browser/blob/blob_async_transport_request_builder.cc
index 6a68050b0d59b7780f6878d818ee451c3b56a197..55f4e9685661d67c243ed14b78d447f951b1de80 100644
--- a/storage/browser/blob/blob_async_transport_request_builder.cc
+++ b/storage/browser/blob/blob_async_transport_request_builder.cc
@@ -261,26 +261,6 @@ void BlobAsyncTransportRequestBuilder::InitializeForIPCRequests(
}
/* static */
-bool BlobAsyncTransportRequestBuilder::ShouldBeShortcut(
- const std::vector<DataElement>& elements,
- size_t memory_available) {
- base::CheckedNumeric<size_t> shortcut_bytes = 0;
- for (const auto& element : elements) {
- DataElement::Type type = element.type();
- if (type == DataElement::TYPE_BYTES_DESCRIPTION) {
- return false;
- }
- if (type == DataElement::TYPE_BYTES) {
- shortcut_bytes += element.length();
- if (!shortcut_bytes.IsValid()) {
- return false;
- }
- }
- }
- return shortcut_bytes.ValueOrDie() <= memory_available;
-}
-
-/* static */
void BlobAsyncTransportRequestBuilder::ComputeHandleSizes(
uint64_t total_memory_size,
size_t max_segment_size,
« no previous file with comments | « storage/browser/blob/blob_async_transport_request_builder.h ('k') | storage/browser/blob/blob_data_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698