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

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

Issue 973723002: Merge: Allow offsets in blobs larger than 2GB on 32 bit Chromium builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
Patch Set: Created 5 years, 10 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
« no previous file with comments | « storage/browser/blob/blob_storage_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_storage_context.cc
diff --git a/storage/browser/blob/blob_storage_context.cc b/storage/browser/blob/blob_storage_context.cc
index 5170ceb37e5d209375c4426dd08c8989a233db9c..b673930c217603c9ccfc29c106eab49dea184ef1 100644
--- a/storage/browser/blob/blob_storage_context.cc
+++ b/storage/browser/blob/blob_storage_context.cc
@@ -375,8 +375,8 @@ bool BlobStorageContext::AppendAllocatedBlobItem(
bool BlobStorageContext::AppendBlob(
const std::string& target_blob_uuid,
const InternalBlobData& blob,
- size_t offset,
- size_t length,
+ uint64_t offset,
+ uint64_t length,
InternalBlobData::Builder* target_blob_builder) {
DCHECK(length > 0);
@@ -395,10 +395,10 @@ bool BlobStorageContext::AppendBlob(
for (; iter != items.end() && length > 0; ++iter) {
scoped_refptr<ShareableBlobDataItem> shareable_item = iter->get();
const BlobDataItem& item = *(shareable_item->item());
- size_t item_length = item.length();
+ uint64_t item_length = item.length();
DCHECK_GT(item_length, offset);
- size_t current_length = item_length - offset;
- size_t new_length = current_length > length ? length : current_length;
+ uint64_t current_length = item_length - offset;
+ uint64_t new_length = current_length > length ? length : current_length;
bool reusing_blob_item = offset == 0 && new_length == item.length();
UMA_HISTOGRAM_BOOLEAN("Storage.Blob.ReusedItem", reusing_blob_item);
« no previous file with comments | « storage/browser/blob/blob_storage_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698