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

Side by Side Diff: base/trace_event/trace_event_system_stats_monitor.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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 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 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_SYSTEM_STATS_MONITOR_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_SYSTEM_STATS_MONITOR_H_
6 #define BASE_TRACE_EVENT_TRACE_EVENT_SYSTEM_STATS_MONITOR_H_ 6 #define BASE_TRACE_EVENT_TRACE_EVENT_SYSTEM_STATS_MONITOR_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 bool IsTimerRunningForTest() const; 49 bool IsTimerRunningForTest() const;
50 50
51 void StartProfiling(); 51 void StartProfiling();
52 52
53 void StopProfiling(); 53 void StopProfiling();
54 54
55 // Ensures the observer starts and stops tracing on the primary thread. 55 // Ensures the observer starts and stops tracing on the primary thread.
56 scoped_refptr<SingleThreadTaskRunner> task_runner_; 56 scoped_refptr<SingleThreadTaskRunner> task_runner_;
57 57
58 // Timer to schedule system profile dumps. 58 // Timer to schedule system profile dumps.
59 RepeatingTimer<TraceEventSystemStatsMonitor> dump_timer_; 59 RepeatingTimer dump_timer_;
60 60
61 WeakPtrFactory<TraceEventSystemStatsMonitor> weak_factory_; 61 WeakPtrFactory<TraceEventSystemStatsMonitor> weak_factory_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(TraceEventSystemStatsMonitor); 63 DISALLOW_COPY_AND_ASSIGN(TraceEventSystemStatsMonitor);
64 }; 64 };
65 65
66 // Converts system memory profiling stats in |input| to 66 // Converts system memory profiling stats in |input| to
67 // trace event compatible JSON and appends to |output|. Visible for testing. 67 // trace event compatible JSON and appends to |output|. Visible for testing.
68 BASE_EXPORT void AppendSystemProfileAsTraceFormat(const SystemMetrics& 68 BASE_EXPORT void AppendSystemProfileAsTraceFormat(const SystemMetrics&
69 system_stats, 69 system_stats,
70 std::string* output); 70 std::string* output);
71 71
72 } // namespace trace_event 72 } // namespace trace_event
73 } // namespace base 73 } // namespace base
74 74
75 #endif // BASE_TRACE_EVENT_TRACE_EVENT_SYSTEM_STATS_MONITOR_H_ 75 #endif // BASE_TRACE_EVENT_TRACE_EVENT_SYSTEM_STATS_MONITOR_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_memory.h ('k') | chrome/browser/android/feedback/connectivity_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698