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

Side by Side Diff: chrome/browser/task_management/test_task_manager.cc

Issue 1545223002: Switch to standard integer types in chrome/browser/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 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 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 #include "chrome/browser/task_management/test_task_manager.h" 5 #include "chrome/browser/task_management/test_task_manager.h"
6 6
7 namespace task_management { 7 namespace task_management {
8 8
9 TestTaskManager::TestTaskManager() 9 TestTaskManager::TestTaskManager()
10 : handle_(base::kNullProcessHandle), 10 : handle_(base::kNullProcessHandle),
11 pid_(base::kNullProcessId) { 11 pid_(base::kNullProcessId) {
12 set_timer_for_testing(scoped_ptr<base::Timer>(new base::MockTimer(true, 12 set_timer_for_testing(scoped_ptr<base::Timer>(new base::MockTimer(true,
13 true))); 13 true)));
14 } 14 }
15 15
16 TestTaskManager::~TestTaskManager() { 16 TestTaskManager::~TestTaskManager() {
17 } 17 }
18 18
19 // task_management::TaskManagerInterface: 19 // task_management::TaskManagerInterface:
20 void TestTaskManager::ActivateTask(TaskId task_id) { 20 void TestTaskManager::ActivateTask(TaskId task_id) {
21 } 21 }
22 22
23 double TestTaskManager::GetCpuUsage(TaskId task_id) const { 23 double TestTaskManager::GetCpuUsage(TaskId task_id) const {
24 return 0.0; 24 return 0.0;
25 } 25 }
26 26
27 int64 TestTaskManager::GetPhysicalMemoryUsage(TaskId task_id) const { 27 int64_t TestTaskManager::GetPhysicalMemoryUsage(TaskId task_id) const {
28 return -1; 28 return -1;
29 } 29 }
30 30
31 int64 TestTaskManager::GetPrivateMemoryUsage(TaskId task_id) const { 31 int64_t TestTaskManager::GetPrivateMemoryUsage(TaskId task_id) const {
32 return -1; 32 return -1;
33 } 33 }
34 34
35 int64 TestTaskManager::GetSharedMemoryUsage(TaskId task_id) const { 35 int64_t TestTaskManager::GetSharedMemoryUsage(TaskId task_id) const {
36 return -1; 36 return -1;
37 } 37 }
38 38
39 int64 TestTaskManager::GetGpuMemoryUsage(TaskId task_id, 39 int64_t TestTaskManager::GetGpuMemoryUsage(TaskId task_id,
40 bool* has_duplicates) const { 40 bool* has_duplicates) const {
41 return -1; 41 return -1;
42 } 42 }
43 43
44 int TestTaskManager::GetIdleWakeupsPerSecond(TaskId task_id) const { 44 int TestTaskManager::GetIdleWakeupsPerSecond(TaskId task_id) const {
45 return -1; 45 return -1;
46 } 46 }
47 47
48 int TestTaskManager::GetNaClDebugStubPort(TaskId task_id) const { 48 int TestTaskManager::GetNaClDebugStubPort(TaskId task_id) const {
49 return -1; 49 return -1;
50 } 50 }
51 51
52 void TestTaskManager::GetGDIHandles(TaskId task_id, 52 void TestTaskManager::GetGDIHandles(TaskId task_id,
53 int64* current, 53 int64_t* current,
54 int64* peak) const { 54 int64_t* peak) const {}
55 }
56 55
57 void TestTaskManager::GetUSERHandles(TaskId task_id, 56 void TestTaskManager::GetUSERHandles(TaskId task_id,
58 int64* current, 57 int64_t* current,
59 int64* peak) const { 58 int64_t* peak) const {}
60 }
61 59
62 int TestTaskManager::GetOpenFdCount(TaskId task_id) const { 60 int TestTaskManager::GetOpenFdCount(TaskId task_id) const {
63 return -1; 61 return -1;
64 } 62 }
65 63
66 bool TestTaskManager::IsTaskOnBackgroundedProcess(TaskId task_id) const { 64 bool TestTaskManager::IsTaskOnBackgroundedProcess(TaskId task_id) const {
67 return false; 65 return false;
68 } 66 }
69 67
70 const base::string16& TestTaskManager::GetTitle(TaskId task_id) const { 68 const base::string16& TestTaskManager::GetTitle(TaskId task_id) const {
(...skipping 18 matching lines...) Expand all
89 } 87 }
90 88
91 const base::ProcessId& TestTaskManager::GetProcessId(TaskId task_id) const { 89 const base::ProcessId& TestTaskManager::GetProcessId(TaskId task_id) const {
92 return pid_; 90 return pid_;
93 } 91 }
94 92
95 Task::Type TestTaskManager::GetType(TaskId task_id) const { 93 Task::Type TestTaskManager::GetType(TaskId task_id) const {
96 return Task::UNKNOWN; 94 return Task::UNKNOWN;
97 } 95 }
98 96
99 int64 TestTaskManager::GetNetworkUsage(TaskId task_id) const { 97 int64_t TestTaskManager::GetNetworkUsage(TaskId task_id) const {
100 return -1; 98 return -1;
101 } 99 }
102 100
103 int64 TestTaskManager::GetProcessTotalNetworkUsage(TaskId task_id) const { 101 int64_t TestTaskManager::GetProcessTotalNetworkUsage(TaskId task_id) const {
104 return -1; 102 return -1;
105 } 103 }
106 104
107 int64 TestTaskManager::GetSqliteMemoryUsed(TaskId task_id) const { 105 int64_t TestTaskManager::GetSqliteMemoryUsed(TaskId task_id) const {
108 return -1; 106 return -1;
109 } 107 }
110 108
111 bool TestTaskManager::GetV8Memory(TaskId task_id, 109 bool TestTaskManager::GetV8Memory(TaskId task_id,
112 int64* allocated, 110 int64_t* allocated,
113 int64* used) const { 111 int64_t* used) const {
114 return false; 112 return false;
115 } 113 }
116 114
117 bool TestTaskManager::GetWebCacheStats( 115 bool TestTaskManager::GetWebCacheStats(
118 TaskId task_id, 116 TaskId task_id,
119 blink::WebCache::ResourceTypeStats* stats) const { 117 blink::WebCache::ResourceTypeStats* stats) const {
120 return false; 118 return false;
121 } 119 }
122 120
123 const TaskIdList& TestTaskManager::GetTaskIdsList() const { 121 const TaskIdList& TestTaskManager::GetTaskIdsList() const {
124 return ids_; 122 return ids_;
125 } 123 }
126 124
127 size_t TestTaskManager::GetNumberOfTasksOnSameProcess(TaskId task_id) const { 125 size_t TestTaskManager::GetNumberOfTasksOnSameProcess(TaskId task_id) const {
128 return 1; 126 return 1;
129 } 127 }
130 128
131 base::TimeDelta TestTaskManager::GetRefreshTime() { 129 base::TimeDelta TestTaskManager::GetRefreshTime() {
132 return GetCurrentRefreshTime(); 130 return GetCurrentRefreshTime();
133 } 131 }
134 132
135 int64 TestTaskManager::GetEnabledFlags() { 133 int64_t TestTaskManager::GetEnabledFlags() {
136 return enabled_resources_flags(); 134 return enabled_resources_flags();
137 } 135 }
138 136
139 } // namespace task_management 137 } // namespace task_management
OLDNEW
« no previous file with comments | « chrome/browser/task_management/test_task_manager.h ('k') | chrome/browser/task_manager/background_information.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698