Index: chrome/browser/task_manager/sampling/task_manager_io_thread_helper.h |
diff --git a/chrome/browser/task_manager/sampling/task_manager_io_thread_helper.h b/chrome/browser/task_manager/sampling/task_manager_io_thread_helper.h |
index ff5315bdd49952a0775239ddfd8782c0883ea56a..d984c0a2918eac2a893f60397c9c78455f70dab5 100644 |
--- a/chrome/browser/task_manager/sampling/task_manager_io_thread_helper.h |
+++ b/chrome/browser/task_manager/sampling/task_manager_io_thread_helper.h |
@@ -20,7 +20,7 @@ namespace task_manager { |
// Defines a wrapper of values that will be sent from IO to UI thread upon |
// reception of bytes read notifications. |
-struct BytesReadParam { |
+struct BytesTransferedParam { |
// The PID of the originating process of the URLRequest, if the request is |
// sent on behalf of another process. Otherwise it's 0. |
int origin_pid; |
@@ -36,15 +36,14 @@ struct BytesReadParam { |
// The number of bytes read. |
int64_t byte_count; |
- BytesReadParam(int origin_pid, |
- int child_id, |
- int route_id, |
- int64_t byte_count) |
+ BytesTransferedParam(int origin_pid, |
+ int child_id, |
+ int route_id, |
+ int64_t byte_count) |
: origin_pid(origin_pid), |
child_id(child_id), |
route_id(route_id), |
- byte_count(byte_count) { |
- } |
+ byte_count(byte_count) {} |
}; |
// Defines a utility class used to schedule the creation and removal of the |
@@ -68,25 +67,43 @@ class TaskManagerIoThreadHelper { |
static void CreateInstance(); |
static void DeleteInstance(); |
- // This is used to forward the call to update the network bytes from the |
- // TaskManagerInterface if the new task manager is enabled. |
+ // This is used to forward the call to update the network bytes with read |
+ // bytes from the TaskManagerInterface if the new task manager is enabled. |
static void OnRawBytesRead(const net::URLRequest& request, |
int64_t bytes_read); |
+ // This is used to forward the call to update the network bytes with sent |
+ // bytes from the TaskManagerInterface if the new task manager is enabled. |
+ static void OnRawBytesSent(const net::URLRequest& request, |
+ int64_t bytes_sent); |
+ |
private: |
TaskManagerIoThreadHelper(); |
~TaskManagerIoThreadHelper(); |
// We gather multiple notifications on the IO thread in one second before a |
- // call is made to the following function to start the processing. |
+ // call is made to the following function to start the processing for read |
+ // bytes. |
void OnMultipleBytesReadIO(); |
// This will update the task manager with the network bytes read. |
void OnNetworkBytesRead(const net::URLRequest& request, int64_t bytes_read); |
+ // We gather multiple notifications on the IO thread in one second before a |
+ // call is made to the following function to start the processing for sent |
+ // bytes. |
+ void OnMultipleBytesSentIO(); |
+ |
+ // This will update the task manager with the network bytes sent. |
+ void OnNetworkBytesSent(const net::URLRequest& request, int64_t bytes_sent); |
+ |
+ // This buffer will be filled on IO thread with information about the number |
+ // of bytes read from URLRequests. |
+ std::vector<BytesTransferedParam> bytes_read_buffer_; |
+ |
// This buffer will be filled on IO thread with information about the number |
// of bytes read from URLRequests. |
- std::vector<BytesReadParam> bytes_read_buffer_; |
+ std::vector<BytesTransferedParam> bytes_sent_buffer_; |
base::WeakPtrFactory<TaskManagerIoThreadHelper> weak_factory_; |