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

Unified Diff: content/common/host_discardable_shared_memory_manager.h

Issue 1430743002: content: Always run EnforceMemoryPolicy() callbacks on the same thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/common/host_discardable_shared_memory_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/host_discardable_shared_memory_manager.h
diff --git a/content/common/host_discardable_shared_memory_manager.h b/content/common/host_discardable_shared_memory_manager.h
index 00ba1b51efa87144b3c2aa2aa766ed392cd9b607..aa5349a5410b68387adf060c10ba4a19ab2dc498 100644
--- a/content/common/host_discardable_shared_memory_manager.h
+++ b/content/common/host_discardable_shared_memory_manager.h
@@ -7,6 +7,7 @@
#include <vector>
+#include "base/callback.h"
#include "base/containers/hash_tables.h"
#include "base/format_macros.h"
#include "base/memory/discardable_memory_allocator.h"
@@ -17,6 +18,7 @@
#include "base/memory/weak_ptr.h"
#include "base/process/process_handle.h"
#include "base/synchronization/lock.h"
+#include "base/thread_task_runner_handle.h"
#include "base/trace_event/memory_dump_provider.h"
#include "content/common/content_export.h"
@@ -127,6 +129,9 @@ class CONTENT_EXPORT HostDiscardableSharedMemoryManager
size_t memory_limit_;
size_t bytes_allocated_;
scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_;
+ scoped_refptr<base::SingleThreadTaskRunner>
+ enforce_memory_policy_task_runner_;
+ base::Closure enforce_memory_policy_callback_;
bool enforce_memory_policy_pending_;
base::WeakPtrFactory<HostDiscardableSharedMemoryManager> weak_ptr_factory_;
« no previous file with comments | « no previous file | content/common/host_discardable_shared_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698