Index: chrome/browser/task_manager/providers/task.h |
diff --git a/chrome/browser/task_manager/providers/task.h b/chrome/browser/task_manager/providers/task.h |
index a3e91ceeeb21cf116c49c285f3bac1ca7f0957a6..7d0dbff24c2ba870bab31a1775accc0e9b9499b0 100644 |
--- a/chrome/browser/task_manager/providers/task.h |
+++ b/chrome/browser/task_manager/providers/task.h |
@@ -85,9 +85,14 @@ class Task { |
// Will receive this notification through the task manager from |
// |ChromeNetworkDelegate::OnNetworkBytesReceived()|. The task will add to the |
- // |current_byte_count_| in this refresh cycle. |
+ // |current_read_byte_count_| in this refresh cycle. |
void OnNetworkBytesRead(int64_t bytes_read); |
+ // Will receive this notification through the task manager from |
+ // |ChromeNetworkDelegate::OnNetworkBytesSent()|. The task will add to the |
+ // |current_sent_byte_count_| in this refresh cycle. |
+ void OnNetworkBytesSent(int64_t bytes_sent); |
+ |
// Returns the task type. |
virtual Type GetType() const = 0; |
@@ -143,6 +148,7 @@ class Task { |
int64_t task_id() const { return task_id_; } |
int64_t network_usage() const { return network_usage_; } |
+ int64_t total_network_usage() const { return total_network_usage_; } |
const base::string16& title() const { return title_; } |
const std::string& rappor_sample_name() const { return rappor_sample_name_; } |
const gfx::ImageSkia& icon() const { return icon_; } |
@@ -164,10 +170,43 @@ class Task { |
// second. A value of -1 means this task doesn't report network usage data. |
int64_t network_usage_; |
+ // The task's total network usage for its lifetime measured in bytes |
ncarter (slow)
2017/06/08 23:37:18
Extra space before 'total'
cburn
2017/06/14 18:04:37
Done.
|
+ // A value of -1 means this task doesn't report network usage data. |
+ int64_t total_network_usage_; |
+ |
+ // The task's network usage for reading data in the current refresh cycle |
+ // measured in bytes per second. A value of -1 means this task doesn't report |
+ // network usage data. |
+ int64_t network_read_usage_; |
+ |
+ // The task's network usage for sending data in the current refresh cycle |
+ // measured in bytes per second. A value of -1 means this task doesn't report |
+ // network usage data. |
+ int64_t network_sent_usage_; |
+ |
+ // TODO: cburn clearn this up |
+ // The current network bytes sent and received by this task during the current |
+ // refresh cycle. A value of -1 means this task has never been notified of any |
+ // network usage. |
+ // int64_t current_byte_count_; |
+ |
// The current network bytes received by this task during the current refresh |
// cycle. A value of -1 means this task has never been notified of any network |
// usage. |
- int64_t current_byte_count_; |
+ int64_t current_read_byte_count_; |
+ |
+ // The current network bytes sent by this task during the current refresh |
+ // cycle. A value of -1 means this task has never been notified of any network |
+ // usage. |
+ int64_t current_sent_byte_count_; |
+ |
+ // The current total number of bytes read by this task. A value of -1 means |
+ // that this task has never read any bytes. |
+ int64_t total_read_byte_count_; |
+ |
+ // The current total number of bytes sent by this task. A value of -1 means |
+ // that this task has never sent any bytes. |
+ int64_t total_sent_byte_count_; |
ncarter (slow)
2017/06/08 23:37:18
Let's try to reduce the number of fields here to a
cburn
2017/06/14 18:04:37
Done.
|
// The title of the task. |
base::string16 title_; |