| OLD | NEW |
| 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/sampling/task_manager_impl.h" | 5 #include "chrome/browser/task_management/sampling/task_manager_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/task_management/providers/browser_process_task_provider
.h" | 10 #include "chrome/browser/task_management/providers/browser_process_task_provider
.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 // Invalidate the cached sorted IDs by clearing the list. | 290 // Invalidate the cached sorted IDs by clearing the list. |
| 291 sorted_task_ids_.clear(); | 291 sorted_task_ids_.clear(); |
| 292 | 292 |
| 293 if (task_group->empty()) { | 293 if (task_group->empty()) { |
| 294 task_groups_by_proc_id_.erase(proc_id); | 294 task_groups_by_proc_id_.erase(proc_id); |
| 295 delete task_group; | 295 delete task_group; |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 | 298 |
| 299 void TaskManagerImpl::OnVideoMemoryUsageStatsUpdate( | 299 void TaskManagerImpl::OnVideoMemoryUsageStatsUpdate( |
| 300 const gpu::VideoMemoryUsageStats& gpu_memory_stats) { | 300 const content::GPUVideoMemoryUsageStats& gpu_memory_stats) { |
| 301 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 301 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 302 | 302 |
| 303 gpu_memory_stats_ = gpu_memory_stats; | 303 gpu_memory_stats_ = gpu_memory_stats; |
| 304 } | 304 } |
| 305 | 305 |
| 306 // static | 306 // static |
| 307 void TaskManagerImpl::OnMultipleBytesReadUI( | 307 void TaskManagerImpl::OnMultipleBytesReadUI( |
| 308 std::vector<BytesReadParam>* params) { | 308 std::vector<BytesReadParam>* params) { |
| 309 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 309 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 310 DCHECK(params); | 310 DCHECK(params); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 DCHECK(ContainsKey(task_groups_by_task_id_, task_id)); | 389 DCHECK(ContainsKey(task_groups_by_task_id_, task_id)); |
| 390 | 390 |
| 391 return task_groups_by_task_id_.at(task_id); | 391 return task_groups_by_task_id_.at(task_id); |
| 392 } | 392 } |
| 393 | 393 |
| 394 Task* TaskManagerImpl::GetTaskByTaskId(TaskId task_id) const { | 394 Task* TaskManagerImpl::GetTaskByTaskId(TaskId task_id) const { |
| 395 return GetTaskGroupByTaskId(task_id)->GetTaskById(task_id); | 395 return GetTaskGroupByTaskId(task_id)->GetTaskById(task_id); |
| 396 } | 396 } |
| 397 | 397 |
| 398 } // namespace task_management | 398 } // namespace task_management |
| OLD | NEW |