diff options
-rw-r--r-- | chrome/browser/task_manager/task_manager_resource_providers.cc | 3 | ||||
-rw-r--r-- | content/browser/browser_child_process_host.cc | 4 | ||||
-rw-r--r-- | content/public/browser/child_process_data.h | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index 43415fc..4853396 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -1076,8 +1076,7 @@ void TaskManagerChildProcessResourceProvider::RetrieveChildProcessData() { // Only add processes which are already started, since we need their handle. if ((*iter)->handle() == base::kNullProcessHandle) continue; - content::ChildProcessData data; - data.type = (*iter)->type(); + content::ChildProcessData data((*iter)->type()); data.name = (*iter)->name(); data.handle = (*iter)->handle(); child_processes.push_back(data); diff --git a/content/browser/browser_child_process_host.cc b/content/browser/browser_child_process_host.cc index 93c997b..7f737bc 100644 --- a/content/browser/browser_child_process_host.cc +++ b/content/browser/browser_child_process_host.cc @@ -56,12 +56,12 @@ void ChildNotificationHelper(int notification_type, BrowserChildProcessHost::BrowserChildProcessHost( content::ProcessType type) - : ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)), + : data_(type), + ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)), #if !defined(OS_WIN) ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)), #endif disconnect_was_alive_(false) { - data_.type = type; data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId(); child_process_host_.reset(ChildProcessHost::Create(this)); diff --git a/content/public/browser/child_process_data.h b/content/public/browser/child_process_data.h index 6f20dd3..2124d80 100644 --- a/content/public/browser/child_process_data.h +++ b/content/public/browser/child_process_data.h @@ -30,7 +30,9 @@ struct ChildProcessData { // The handle to the process. base::ProcessHandle handle; - ChildProcessData() : id(0), handle(base::kNullProcessHandle) {} + ChildProcessData(content::ProcessType type) + : type(type), id(0), handle(base::kNullProcessHandle) { +} }; } // namespace content |