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

Unified Diff: chrome/browser/extensions/extension_processes_api.cc

Issue 10169022: ifdef'd out more references to TaskManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_processes_api.cc
diff --git a/chrome/browser/extensions/extension_processes_api.cc b/chrome/browser/extensions/extension_processes_api.cc
index 73f8cc68e546100cde3094dad8c098ad6784c90d..9073abd16e198ba815378a7e69d4c31212bfa99c 100644
--- a/chrome/browser/extensions/extension_processes_api.cc
+++ b/chrome/browser/extensions/extension_processes_api.cc
@@ -46,12 +46,16 @@ ExtensionProcessesEventRouter* ExtensionProcessesEventRouter::GetInstance() {
}
ExtensionProcessesEventRouter::ExtensionProcessesEventRouter() {
+#if defined(ENABLE_TASK_MANAGER)
model_ = TaskManager::GetInstance()->model();
model_->AddObserver(this);
+#endif // defined(ENABLE_TASK_MANAGER)
}
ExtensionProcessesEventRouter::~ExtensionProcessesEventRouter() {
+#if defined(ENABLE_TASK_MANAGER)
model_->RemoveObserver(this);
+#endif // defined(ENABLE_TASK_MANAGER)
}
void ExtensionProcessesEventRouter::ObserveProfile(Profile* profile) {
@@ -59,14 +63,19 @@ void ExtensionProcessesEventRouter::ObserveProfile(Profile* profile) {
}
void ExtensionProcessesEventRouter::ListenerAdded() {
+#if defined(ENABLE_TASK_MANAGER)
model_->StartUpdating();
+#endif // defined(ENABLE_TASK_MANAGER)
}
void ExtensionProcessesEventRouter::ListenerRemoved() {
+#if defined(ENABLE_TASK_MANAGER)
model_->StopUpdating();
+#endif // defined(ENABLE_TASK_MANAGER)
}
void ExtensionProcessesEventRouter::OnItemsChanged(int start, int length) {
+#if defined(ENABLE_TASK_MANAGER)
if (model_) {
ListValue args;
DictionaryValue* processes = new DictionaryValue();
@@ -144,6 +153,7 @@ void ExtensionProcessesEventRouter::OnItemsChanged(int start, int length) {
DispatchEvent(profile, keys::kOnUpdated, json_args);
}
}
+#endif // defined(ENABLE_TASK_MANAGER)
}
void ExtensionProcessesEventRouter::DispatchEvent(Profile* profile,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698