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

Side by Side Diff: base/memory/memory_coordinator_client_registry.cc

Issue 2655083003: Add OnPurgeMemory() to MemoryCoordinatorClient (Closed)
Patch Set: comment Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/memory_coordinator_client_registry.h" 5 #include "base/memory/memory_coordinator_client_registry.h"
6 6
7 namespace base { 7 namespace base {
8 8
9 // static 9 // static
10 MemoryCoordinatorClientRegistry* 10 MemoryCoordinatorClientRegistry*
(...skipping 16 matching lines...) Expand all
27 void MemoryCoordinatorClientRegistry::Unregister( 27 void MemoryCoordinatorClientRegistry::Unregister(
28 MemoryCoordinatorClient* client) { 28 MemoryCoordinatorClient* client) {
29 clients_->RemoveObserver(client); 29 clients_->RemoveObserver(client);
30 } 30 }
31 31
32 void MemoryCoordinatorClientRegistry::Notify(MemoryState state) { 32 void MemoryCoordinatorClientRegistry::Notify(MemoryState state) {
33 clients_->Notify(FROM_HERE, 33 clients_->Notify(FROM_HERE,
34 &base::MemoryCoordinatorClient::OnMemoryStateChange, state); 34 &base::MemoryCoordinatorClient::OnMemoryStateChange, state);
35 } 35 }
36 36
37 void MemoryCoordinatorClientRegistry::PurgeMemory() {
38 clients_->Notify(FROM_HERE, &base::MemoryCoordinatorClient::OnPurgeMemory);
39 }
40
37 } // namespace base 41 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/memory_coordinator_client_registry.h ('k') | base/memory/memory_coordinator_client_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698