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

Unified Diff: chrome/browser/task_management/providers/task.h

Issue 1374283003: Reporting top cpu and memory consumers via rappor on chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn off ResourceReporter on task_management CrOs browser_tests. Created 5 years, 1 month 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_management/providers/task.h
diff --git a/chrome/browser/task_management/providers/task.h b/chrome/browser/task_management/providers/task.h
index 04732995e618d37f64f4fd3ab5f01a6bfa2fe134..da85d86c7cc44e3bacf47177024f5cb23997ff3e 100644
--- a/chrome/browser/task_management/providers/task.h
+++ b/chrome/browser/task_management/providers/task.h
@@ -39,8 +39,11 @@ class Task {
};
// Create a task with the given |title| and the given favicon |icon|. This
- // task runs on a process whose handle is |handle|.
+ // task runs on a process whose handle is |handle|. |rappor_sample| is the
+ // name of the sample to be recorded if this task needs to be reported by
+ // Rappor.
Task(const base::string16& title,
+ const std::string& rappor_sample,
const gfx::ImageSkia* icon,
base::ProcessHandle handle);
virtual ~Task();
@@ -101,12 +104,16 @@ class Task {
int64 task_id() const { return task_id_; }
int64 network_usage() const { return 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_; }
const base::ProcessHandle& process_handle() const { return process_handle_; }
const base::ProcessId& process_id() const { return process_id_; }
protected:
void set_title(const base::string16& new_title) { title_ = new_title; }
+ void set_rappor_sample_name(const std::string& sample) {
+ rappor_sample_name_ = sample;
+ }
void set_icon(const gfx::ImageSkia& new_icon) { icon_ = new_icon; }
private:
@@ -125,6 +132,10 @@ class Task {
// The title of the task.
base::string16 title_;
+ // The name of the sample representing this task when a Rappor sample needs to
+ // be recorded for it.
+ std::string rappor_sample_name_;
+
// The favicon.
gfx::ImageSkia icon_;
« no previous file with comments | « chrome/browser/task_management/providers/child_process_task.cc ('k') | chrome/browser/task_management/providers/task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698