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_; |