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

Unified Diff: chrome/browser/task_manager/sampling/shared_sampler.h

Issue 2573183002: Add process start time and CPU time columns to task manager (Closed)
Patch Set: Fix nits Created 4 years 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
Index: chrome/browser/task_manager/sampling/shared_sampler.h
diff --git a/chrome/browser/task_manager/sampling/shared_sampler.h b/chrome/browser/task_manager/sampling/shared_sampler.h
index def063488db11eaf4a92a8351dc611ab9a92e96e..86e19ed1ab634d354ec36f861da132cbb4c1d6b2 100644
--- a/chrome/browser/task_manager/sampling/shared_sampler.h
+++ b/chrome/browser/task_manager/sampling/shared_sampler.h
@@ -41,6 +41,8 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
// These callbacks are passed via RegisterCallbacks.
using OnIdleWakeupsCallback = base::Callback<void(int)>;
using OnPhysicalMemoryCallback = base::Callback<void(int64_t)>;
+ using OnStartTimeCallback = base::Callback<void(int64_t)>;
+ using OnCpuTimeCallback = base::Callback<void(int64_t)>;
// Returns a combination of refresh flags supported by the shared sampler.
int64_t GetSupportedFlags() const;
@@ -48,7 +50,9 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
// Registers task group specific callbacks.
void RegisterCallbacks(base::ProcessId process_id,
const OnIdleWakeupsCallback& on_idle_wakeups,
- const OnPhysicalMemoryCallback& on_physical_memory);
+ const OnPhysicalMemoryCallback& on_physical_memory,
+ const OnStartTimeCallback& on_start_time,
+ const OnCpuTimeCallback& on_cpu_time);
// Unregisters task group specific callbacks.
void UnregisterCallbacks(base::ProcessId process_id);
@@ -71,6 +75,8 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
OnIdleWakeupsCallback on_idle_wakeups;
OnPhysicalMemoryCallback on_physical_memory;
+ OnStartTimeCallback on_start_time;
+ OnCpuTimeCallback on_cpu_time;
private:
DISALLOW_COPY_AND_ASSIGN(Callbacks);
@@ -83,6 +89,8 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
base::ProcessId process_id;
int idle_wakeups_per_second;
int64_t physical_bytes;
+ int64_t start_time;
brucedawson 2016/12/19 21:51:05 Should these be using a type that includes semanti
chengx 2016/12/20 00:51:12 Done.
+ int64_t cpu_time;
};
typedef std::vector<RefreshResult> RefreshResults;

Powered by Google App Engine
This is Rietveld 408576698