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

Unified Diff: content/browser/dom_storage/dom_storage_context_wrapper.cc

Issue 2648323005: memory coordinator: Add MemoryCoordinatorClient::OnPurgeMemory() (Closed)
Patch Set: Created 3 years, 11 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: content/browser/dom_storage/dom_storage_context_wrapper.cc
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc
index c2023a6ada6a644fa693b20251cdf0ceeefa2be9..31b4937a4286b412e8b8402c52ebf24153b9d41e 100644
--- a/content/browser/dom_storage/dom_storage_context_wrapper.cc
+++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc
@@ -275,26 +275,8 @@ void DOMStorageContextWrapper::OnMemoryPressure(
PurgeMemory(purge_option);
}
-void DOMStorageContextWrapper::OnMemoryStateChange(base::MemoryState state) {
- // TODO(hajimehoshi): As OnMemoryStateChange changes the state, we should
- // adjust the limitation to the amount of cache, DomStroageContextImpl doesn't
- // have such limitation so far though.
- switch (state) {
- case base::MemoryState::NORMAL:
- // Don't have to purge memory here.
- break;
- case base::MemoryState::THROTTLED:
- // TOOD(hajimehoshi): We don't have throttling 'level' so far. When we
- // have such value, let's change the argument accroding to the value.
- PurgeMemory(DOMStorageContextImpl::PURGE_AGGRESSIVE);
- break;
- case base::MemoryState::SUSPENDED:
- // Note that SUSPENDED never occurs in the main browser process so far.
- // Fall through.
- case base::MemoryState::UNKNOWN:
- NOTREACHED();
- break;
- }
+void DOMStorageContextWrapper::OnPurgeMemory() {
+ PurgeMemory(DOMStorageContextImpl::PURGE_AGGRESSIVE);
}
void DOMStorageContextWrapper::PurgeMemory(DOMStorageContextImpl::PurgeOption

Powered by Google App Engine
This is Rietveld 408576698