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

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

Issue 2448353002: [BlobAsync] Moving async handling into BlobStorageContext & quota out. (Closed)
Patch Set: compile fix 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_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()) {

Powered by Google App Engine
This is Rietveld 408576698