Add method for suppressing MemoryPressureListener notifications

This patch adds a new static method to MemoryPressureListener which can
be used to start/stop suppressing memory pressure notifications:

  // Start suppressing memory pressure notifications.
  MemoryPressureListener::SetNotificationsSuppressed(true);

  // Stop suppressing memory pressure notifications.
  MemoryPressureListener::SetNotificationsSuppressed(false);

This patch represents the first step towards implementing a DevTools API
for suppressing and simulating memory pressure signals in Chrome. The
main use case for this feature is to enforce consistent conditions
across memory measurements. See https://goo.gl/cZFdH3 for more details.

BUG=516776

Review URL: https://codereview.chromium.org/1312163003

Cr-Commit-Position: refs/heads/master@{#347622}


CrOS-Libchrome-Original-Commit: da4982addfa8b6a5e25b794565c6c7158c1ec8cc
4 files changed
tree: b71ffc59330d4fbbe63511c0632be7bc08291189
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/