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

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

Issue 2448353002: [BlobAsync] Moving async handling into BlobStorageContext & quota out. (Closed)
Patch Set: hopefully fixed android/windows compile, and comments 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: 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,

Powered by Google App Engine
This is Rietveld 408576698