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

Unified Diff: storage/browser/blob/blob_memory_controller.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
« no previous file with comments | « storage/browser/blob/blob_memory_controller.h ('k') | storage/browser/blob/blob_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_memory_controller.cc
diff --git a/storage/browser/blob/blob_memory_controller.cc b/storage/browser/blob/blob_memory_controller.cc
index 422cddf748963812aef5869e5d7e35cb3c10fd28..56ad7da49a4d144a896bf85f0aa8a80f63247801 100644
--- a/storage/browser/blob/blob_memory_controller.cc
+++ b/storage/browser/blob/blob_memory_controller.cc
@@ -492,10 +492,12 @@ base::WeakPtr<QuotaAllocationTask> BlobMemoryController::ReserveFileQuota(
}
void BlobMemoryController::NotifyMemoryItemsUsed(
- std::vector<scoped_refptr<ShareableBlobDataItem>>& items) {
+ const std::vector<scoped_refptr<ShareableBlobDataItem>>& items) {
for (const auto& item : items) {
- DCHECK_EQ(DataElement::TYPE_BYTES, item->item()->type());
- DCHECK_EQ(ShareableBlobDataItem::POPULATED_WITH_QUOTA, item->state());
+ if (item->item()->type() != DataElement::TYPE_BYTES ||
+ item->state() != ShareableBlobDataItem::POPULATED_WITH_QUOTA) {
+ continue;
+ }
// We don't want to re-add the item if we're currently paging it to disk.
if (items_paging_to_file_.find(item->item_id()) !=
items_paging_to_file_.end()) {
« no previous file with comments | « storage/browser/blob/blob_memory_controller.h ('k') | storage/browser/blob/blob_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698