Chromium Code Reviews| Index: chrome/browser/task_manager/sampling/task_manager_impl.h |
| diff --git a/chrome/browser/task_manager/sampling/task_manager_impl.h b/chrome/browser/task_manager/sampling/task_manager_impl.h |
| index b483494326c315aa64dd414f5d77358422e6d75f..7c7eea62133648faef390ecd5a24f18c34325e94 100644 |
| --- a/chrome/browser/task_manager/sampling/task_manager_impl.h |
| +++ b/chrome/browser/task_manager/sampling/task_manager_impl.h |
| @@ -74,7 +74,9 @@ class TaskManagerImpl : public TaskManagerInterface, |
| base::TerminationStatus* out_status, |
| int* out_error_code) const override; |
| int64_t GetNetworkUsage(TaskId task_id) const override; |
| + int64_t GetTotalNetworkUsage(TaskId task_id) const override; |
| int64_t GetProcessTotalNetworkUsage(TaskId task_id) const override; |
| + int64_t GetTotalProcessTotalNetworkUsage(TaskId task_id) const override; |
| int64_t GetSqliteMemoryUsed(TaskId task_id) const override; |
| bool GetV8Memory(TaskId task_id, |
| int64_t* allocated, |
| @@ -96,7 +98,11 @@ class TaskManagerImpl : public TaskManagerInterface, |
| // The notification method on the UI thread when multiple bytes are read |
| // from URLRequests. This will be called by the |io_thread_helper_| |
| - static void OnMultipleBytesReadUI(std::vector<BytesReadParam>* params); |
| + static void OnMultipleBytesReadUI(std::vector<BytesTransferedParam>* params); |
| + |
| + // The notification method on the UI thread when multiple bytes are sent |
| + // from URLRequests. This will be called by the |io_thread_helper_| |
| + static void OnMultipleBytesSentUI(std::vector<BytesTransferedParam>* params); |
|
ncarter (slow)
2017/06/08 23:37:18
Because the PostTask operation itself is a few hea
cburn
2017/06/14 18:04:38
Done.
|
| private: |
| friend struct base::LazyInstanceTraitsBase<TaskManagerImpl>; |
| @@ -119,7 +125,14 @@ class TaskManagerImpl : public TaskManagerInterface, |
| // false otherwise, at which point the caller must explicitly match these |
| // bytes to the browser process by calling this method again with |
| // |param.origin_pid = 0| and |param.child_id = param.route_id = -1|. |
| - bool UpdateTasksWithBytesRead(const BytesReadParam& param); |
| + bool UpdateTasksWithBytesRead(const BytesTransferedParam& param); |
| + |
| + // Based on |param| the appropriate task will be updated by its network usage. |
| + // Returns true if it was able to match |param| to an existing task, returns |
| + // false otherwise, at which point the caller must explicitly match these |
| + // bytes to the browser process by calling this method again with |
| + // |param.origin_pid = 0| and |param.child_id = param.route_id = -1|. |
| + bool UpdateTasksWithBytesSent(const BytesTransferedParam& param); |
| TaskGroup* GetTaskGroupByTaskId(TaskId task_id) const; |
| Task* GetTaskByTaskId(TaskId task_id) const; |