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

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

Issue 877993003: Pass FROM_HERE to ObserverListThreadSafe::Notify to improve profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « base/android/application_status_listener.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_pressure_listener.h" 5 #include "base/memory/memory_pressure_listener.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/observer_list_threadsafe.h" 8 #include "base/observer_list_threadsafe.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void MemoryPressureListener::Notify(MemoryPressureLevel memory_pressure_level) { 47 void MemoryPressureListener::Notify(MemoryPressureLevel memory_pressure_level) {
48 callback_.Run(memory_pressure_level); 48 callback_.Run(memory_pressure_level);
49 } 49 }
50 50
51 // static 51 // static
52 void MemoryPressureListener::NotifyMemoryPressure( 52 void MemoryPressureListener::NotifyMemoryPressure(
53 MemoryPressureLevel memory_pressure_level) { 53 MemoryPressureLevel memory_pressure_level) {
54 DCHECK_NE(memory_pressure_level, MEMORY_PRESSURE_LEVEL_NONE); 54 DCHECK_NE(memory_pressure_level, MEMORY_PRESSURE_LEVEL_NONE);
55 TRACE_EVENT1("memory", "MemoryPressureListener::NotifyMemoryPressure", 55 TRACE_EVENT1("memory", "MemoryPressureListener::NotifyMemoryPressure",
56 "level", memory_pressure_level); 56 "level", memory_pressure_level);
57 g_observers.Get().Notify(&MemoryPressureListener::Notify, 57 g_observers.Get().Notify(FROM_HERE, &MemoryPressureListener::Notify,
58 memory_pressure_level); 58 memory_pressure_level);
59 } 59 }
60 60
61 } // namespace base 61 } // namespace base
OLDNEW
« no previous file with comments | « base/android/application_status_listener.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698