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

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

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 4 years, 9 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),
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 const base::ProcessId& TestTaskManager::GetProcessId(TaskId task_id) const { 92 const base::ProcessId& TestTaskManager::GetProcessId(TaskId task_id) const {
93 return pid_; 93 return pid_;
94 } 94 }
95 95
96 Task::Type TestTaskManager::GetType(TaskId task_id) const { 96 Task::Type TestTaskManager::GetType(TaskId task_id) const {
97 return Task::UNKNOWN; 97 return Task::UNKNOWN;
98 } 98 }
99 99
100 int TestTaskManager::GetTabId(TaskId task_id) const {
101 return -1;
102 }
103
104 int TestTaskManager::GetChildProcessUniqueId(TaskId task_id) const {
105 return 0;
106 }
107
108 void TestTaskManager::GetTerminationStatus(TaskId task_id,
109 base::TerminationStatus* out_status,
110 int* out_error_code) const {
111 DCHECK(out_status);
112 DCHECK(out_error_code);
113
114 *out_status = base::TERMINATION_STATUS_STILL_RUNNING;
115 *out_error_code = 0;
116 }
117
100 int64_t TestTaskManager::GetNetworkUsage(TaskId task_id) const { 118 int64_t TestTaskManager::GetNetworkUsage(TaskId task_id) const {
101 return -1; 119 return -1;
102 } 120 }
103 121
104 int64_t TestTaskManager::GetProcessTotalNetworkUsage(TaskId task_id) const { 122 int64_t TestTaskManager::GetProcessTotalNetworkUsage(TaskId task_id) const {
105 return -1; 123 return -1;
106 } 124 }
107 125
108 int64_t TestTaskManager::GetSqliteMemoryUsed(TaskId task_id) const { 126 int64_t TestTaskManager::GetSqliteMemoryUsed(TaskId task_id) const {
109 return -1; 127 return -1;
110 } 128 }
111 129
112 bool TestTaskManager::GetV8Memory(TaskId task_id, 130 bool TestTaskManager::GetV8Memory(TaskId task_id,
113 int64_t* allocated, 131 int64_t* allocated,
114 int64_t* used) const { 132 int64_t* used) const {
115 return false; 133 return false;
116 } 134 }
117 135
118 bool TestTaskManager::GetWebCacheStats( 136 bool TestTaskManager::GetWebCacheStats(
119 TaskId task_id, 137 TaskId task_id,
120 blink::WebCache::ResourceTypeStats* stats) const { 138 blink::WebCache::ResourceTypeStats* stats) const {
121 return false; 139 return false;
122 } 140 }
123 141
124 const TaskIdList& TestTaskManager::GetTaskIdsList() const { 142 const TaskIdList& TestTaskManager::GetTaskIdsList() const {
125 return ids_; 143 return ids_;
126 } 144 }
127 145
146 TaskIdList TestTaskManager::GetIdsOfTasksSharingSameProcess(
147 TaskId task_id) const {
148 TaskIdList result;
149 result.push_back(task_id);
150 return result;
151 }
152
128 size_t TestTaskManager::GetNumberOfTasksOnSameProcess(TaskId task_id) const { 153 size_t TestTaskManager::GetNumberOfTasksOnSameProcess(TaskId task_id) const {
129 return 1; 154 return 1;
130 } 155 }
131 156
132 base::TimeDelta TestTaskManager::GetRefreshTime() { 157 base::TimeDelta TestTaskManager::GetRefreshTime() {
133 return GetCurrentRefreshTime(); 158 return GetCurrentRefreshTime();
134 } 159 }
135 160
136 int64_t TestTaskManager::GetEnabledFlags() { 161 int64_t TestTaskManager::GetEnabledFlags() {
137 return enabled_resources_flags(); 162 return enabled_resources_flags();
138 } 163 }
139 164
140 } // namespace task_management 165 } // namespace task_management
OLDNEW
« no previous file with comments | « chrome/browser/task_management/test_task_manager.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698