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

Unified Diff: chrome/browser/task_manager/task_manager_interface.h

Issue 2905403002: plumb network upload into the task manager (Closed)
Patch Set: fixed comments Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/task_manager/task_manager_interface.h
diff --git a/chrome/browser/task_manager/task_manager_interface.h b/chrome/browser/task_manager/task_manager_interface.h
index c4e31c24234f6f922dc8db5292a98befad2dbbd8..fcd9c32a2f3739cc77a5109a8aa8c78d7008267f 100644
--- a/chrome/browser/task_manager/task_manager_interface.h
+++ b/chrome/browser/task_manager/task_manager_interface.h
@@ -51,10 +51,15 @@ class TaskManagerInterface {
static TaskManagerInterface* GetTaskManager();
// This notification will be received on the IO thread from
- // ChromeNetworkDelegate to update the task manager with network usage.
+ // ChromeNetworkDelegate to update the task manager with read network usage.
static void OnRawBytesRead(const net::URLRequest& request,
int64_t bytes_read);
+ // This notification will be received on the IO thread from
+ // ChromeNetworkDelegate to update the task manager with sent network usage.
+ static void OnRawBytesSent(const net::URLRequest& request,
+ int64_t bytes_sent);
+
void AddObserver(TaskManagerObserver* observer);
void RemoveObserver(TaskManagerObserver* observer);
@@ -172,11 +177,13 @@ class TaskManagerInterface {
int* out_error_code) const = 0;
// Returns the network usage (in bytes per second) during the current refresh
- // cycle for the task with |task_id|. A value of -1 means no valid value is
- // currently available or that task has never been notified of any network
- // usage.
+ // cycle for the task with |task_id|.
virtual int64_t GetNetworkUsage(TaskId task_id) const = 0;
+ // Returns the network usage during the current lifetime of the task
+ // for the task with |task_id|.
+ virtual int64_t GetCumulativeNetworkUsage(TaskId task_id) const = 0;
+
// Returns the total network usage (in bytes per second) during the current
// refresh cycle for the process on which the task with |task_id| is running.
// This is the sum of all the network usage of the individual tasks (that
@@ -184,6 +191,13 @@ class TaskManagerInterface {
// usage calculation refresh is currently not available.
virtual int64_t GetProcessTotalNetworkUsage(TaskId task_id) const = 0;
+ // Returns the total network usage during the lifetime of the process
+ // on which the task with |task_id| is running.
+ // This is the sum of all the network usage of the individual tasks (that
+ // can be gotten by the above GetTotalNetworkUsage()).
+ virtual int64_t GetCumulativeProcessTotalNetworkUsage(
+ TaskId task_id) const = 0;
+
// Returns the Sqlite used memory (in bytes) for the task with |task_id|.
// A value of -1 means no valid value is currently available.
virtual int64_t GetSqliteMemoryUsed(TaskId task_id) const = 0;
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest_util.cc ('k') | chrome/browser/task_manager/task_manager_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698