Index: chrome/browser/task_manager/task_manager.cc |
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc |
index 0457b63e780cdc2e2b85e85500100ab2f04b1068..5ba8f202c2dce56dc4704ff3fa035be9d7998c2b 100644 |
--- a/chrome/browser/task_manager/task_manager.cc |
+++ b/chrome/browser/task_manager/task_manager.cc |
@@ -1131,13 +1131,12 @@ int CountExtensionBackgroundPagesForProfile(Profile* profile) { |
ExtensionProcessManager* manager = profile->GetExtensionProcessManager(); |
if (!manager) |
return count; |
- for (ExtensionProcessManager::const_iterator iter = manager->begin(); |
- iter != manager->end(); |
- ++iter) { |
- if ((*iter)->extension_host_type() == |
- chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) { |
- count++; |
- } |
+ |
+ const ExtensionProcessManager::ExtensionHostSet& background_hosts = |
+ manager->background_hosts(); |
+ for (ExtensionProcessManager::const_iterator iter = background_hosts.begin(); |
+ iter != background_hosts.end(); ++iter) { |
+ ++count; |
} |
return count; |
} |