OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/task_management/providers/child_process_task.h" | 5 #include "chrome/browser/task_management/providers/child_process_task.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 default: | 159 default: |
160 return false; | 160 return false; |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 } // namespace | 164 } // namespace |
165 | 165 |
166 ChildProcessTask::ChildProcessTask(const content::ChildProcessData& data) | 166 ChildProcessTask::ChildProcessTask(const content::ChildProcessData& data) |
167 : Task(GetLocalizedTitle(data.name, data.process_type), | 167 : Task(GetLocalizedTitle(data.name, data.process_type), |
| 168 base::UTF16ToASCII(data.name), |
168 GetDefaultIcon(), | 169 GetDefaultIcon(), |
169 data.handle), | 170 data.handle), |
170 process_resources_sampler_(CreateProcessResourcesSampler(data.id)), | 171 process_resources_sampler_(CreateProcessResourcesSampler(data.id)), |
171 v8_memory_allocated_(-1), | 172 v8_memory_allocated_(-1), |
172 v8_memory_used_(-1), | 173 v8_memory_used_(-1), |
173 unique_child_process_id_(data.id), | 174 unique_child_process_id_(data.id), |
174 process_type_(data.process_type), | 175 process_type_(data.process_type), |
175 uses_v8_memory_(UsesV8Memory(process_type_)) { | 176 uses_v8_memory_(UsesV8Memory(process_type_)) { |
176 } | 177 } |
177 | 178 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 234 |
234 int64 ChildProcessTask::GetV8MemoryAllocated() const { | 235 int64 ChildProcessTask::GetV8MemoryAllocated() const { |
235 return v8_memory_allocated_; | 236 return v8_memory_allocated_; |
236 } | 237 } |
237 | 238 |
238 int64 ChildProcessTask::GetV8MemoryUsed() const { | 239 int64 ChildProcessTask::GetV8MemoryUsed() const { |
239 return v8_memory_used_; | 240 return v8_memory_used_; |
240 } | 241 } |
241 | 242 |
242 } // namespace task_management | 243 } // namespace task_management |
OLD | NEW |