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

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: Added back transport controller test, small cleanups Created 4 years, 6 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 a77d408ca8ffa34dd4ebea3e28b407520fe0cf5a..00d04e5f9dfc6ab7fc6f90d79d4df6682e78a63f 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,

Powered by Google App Engine
This is Rietveld 408576698