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

Side by Side Diff: chrome/browser/task_manager/test_task_manager.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_TASK_MANAGER_TEST_TASK_MANAGER_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TEST_TASK_MANAGER_H_
6 #define CHROME_BROWSER_TASK_MANAGER_TEST_TASK_MANAGER_H_ 6 #define CHROME_BROWSER_TASK_MANAGER_TEST_TASK_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/time/time.h"
12 #include "base/timer/mock_timer.h" 13 #include "base/timer/mock_timer.h"
13 #include "chrome/browser/task_manager/task_manager_interface.h" 14 #include "chrome/browser/task_manager/task_manager_interface.h"
14 15
15 namespace task_manager { 16 namespace task_manager {
16 17
17 // This is a partial stub implementation that can be used as a base class for 18 // This is a partial stub implementation that can be used as a base class for
18 // implementations of the task manager used in unit tests. 19 // implementations of the task manager used in unit tests.
19 class TestTaskManager : public TaskManagerInterface { 20 class TestTaskManager : public TaskManagerInterface {
20 public: 21 public:
21 TestTaskManager(); 22 TestTaskManager();
22 ~TestTaskManager() override; 23 ~TestTaskManager() override;
23 24
24 // task_manager::TaskManagerInterface: 25 // task_manager::TaskManagerInterface:
25 void ActivateTask(TaskId task_id) override; 26 void ActivateTask(TaskId task_id) override;
26 bool IsTaskKillable(TaskId task_id) override; 27 bool IsTaskKillable(TaskId task_id) override;
27 void KillTask(TaskId task_id) override; 28 void KillTask(TaskId task_id) override;
28 double GetCpuUsage(TaskId task_id) const override; 29 double GetCpuUsage(TaskId task_id) const override;
30 base::Time GetStartTime(TaskId task_id) const override;
31 base::TimeDelta GetCpuTime(TaskId task_id) const override;
29 int64_t GetPhysicalMemoryUsage(TaskId task_id) const override; 32 int64_t GetPhysicalMemoryUsage(TaskId task_id) const override;
30 int64_t GetPrivateMemoryUsage(TaskId task_id) const override; 33 int64_t GetPrivateMemoryUsage(TaskId task_id) const override;
31 int64_t GetSharedMemoryUsage(TaskId task_id) const override; 34 int64_t GetSharedMemoryUsage(TaskId task_id) const override;
32 int64_t GetSwappedMemoryUsage(TaskId task_id) const override; 35 int64_t GetSwappedMemoryUsage(TaskId task_id) const override;
33 int64_t GetGpuMemoryUsage(TaskId task_id, 36 int64_t GetGpuMemoryUsage(TaskId task_id,
34 bool* has_duplicates) const override; 37 bool* has_duplicates) const override;
35 int GetIdleWakeupsPerSecond(TaskId task_id) const override; 38 int GetIdleWakeupsPerSecond(TaskId task_id) const override;
36 int GetNaClDebugStubPort(TaskId task_id) const override; 39 int GetNaClDebugStubPort(TaskId task_id) const override;
37 void GetGDIHandles(TaskId task_id, 40 void GetGDIHandles(TaskId task_id,
38 int64_t* current, 41 int64_t* current,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 gfx::ImageSkia icon_; 88 gfx::ImageSkia icon_;
86 TaskIdList ids_; 89 TaskIdList ids_;
87 90
88 private: 91 private:
89 DISALLOW_COPY_AND_ASSIGN(TestTaskManager); 92 DISALLOW_COPY_AND_ASSIGN(TestTaskManager);
90 }; 93 };
91 94
92 } // namespace task_manager 95 } // namespace task_manager
93 96
94 #endif // CHROME_BROWSER_TASK_MANAGER_TEST_TASK_MANAGER_H_ 97 #endif // CHROME_BROWSER_TASK_MANAGER_TEST_TASK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698