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

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

Issue 2918523003: Fix BlobMemoryControllerTest.OnMemoryPressure (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | 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 27370be1c3f818c80f34c54177e27bc6ccf0155c..cc9e85d6e02790d05283fa546a97e43d97219bd7 100644
--- a/storage/browser/blob/blob_memory_controller.cc
+++ b/storage/browser/blob/blob_memory_controller.cc
@@ -952,8 +952,10 @@ void BlobMemoryController::OnEvictionComplete(
void BlobMemoryController::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) {
auto time_from_last_evicion = base::TimeTicks::Now() - last_eviction_time_;
- if (time_from_last_evicion.InSeconds() < kMinSecondsForPressureEvictions)
+ if (last_eviction_time_ != base::TimeTicks() &&
+ time_from_last_evicion.InSeconds() < kMinSecondsForPressureEvictions) {
return;
+ }
MaybeScheduleEvictionUntilSystemHealthy(memory_pressure_level);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698