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

Unified Diff: chrome/browser/task_manager/task_manager_resource_providers.cc

Issue 3801008: Expands the chrome.experimental.processes extension API. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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_resource_providers.cc
===================================================================
--- chrome/browser/task_manager/task_manager_resource_providers.cc (revision 62984)
+++ chrome/browser/task_manager/task_manager_resource_providers.cc (working copy)
@@ -354,6 +354,36 @@
return child_process_.handle();
}
+TaskManager::Resource::Type TaskManagerChildProcessResource::GetType() const {
+ // Translate types to TaskManager::ResourceType, since ChildProcessInfo's type
+ // is not available for all TaskManager resources.
+ switch (child_process_.type()) {
+ case ChildProcessInfo::BROWSER_PROCESS:
+ return TaskManager::Resource::BROWSER;
+ case ChildProcessInfo::RENDER_PROCESS:
+ return TaskManager::Resource::RENDERER;
+ case ChildProcessInfo::PLUGIN_PROCESS:
+ return TaskManager::Resource::PLUGIN;
+ case ChildProcessInfo::WORKER_PROCESS:
+ return TaskManager::Resource::WORKER;
+ case ChildProcessInfo::NACL_LOADER_PROCESS:
+ case ChildProcessInfo::NACL_BROKER_PROCESS:
+ return TaskManager::Resource::NACL;
+ case ChildProcessInfo::UTILITY_PROCESS:
+ return TaskManager::Resource::UTILITY;
+ case ChildProcessInfo::PROFILE_IMPORT_PROCESS:
+ return TaskManager::Resource::PROFILE_IMPORT;
+ case ChildProcessInfo::ZYGOTE_PROCESS:
+ return TaskManager::Resource::ZYGOTE;
+ case ChildProcessInfo::SANDBOX_HELPER_PROCESS:
+ return TaskManager::Resource::SANDBOX_HELPER;
+ case ChildProcessInfo::GPU_PROCESS:
+ return TaskManager::Resource::GPU;
+ default:
+ return TaskManager::Resource::UNKNOWN;
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// TaskManagerChildProcessResourceProvider class
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.h ('k') | chrome/browser/task_manager/task_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698