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

Side by Side Diff: chrome/browser/task_management/providers/child_process_task.cc

Issue 1374283003: Reporting top cpu and memory consumers via rappor on chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn off ResourceReporter on task_management CrOs browser_tests. Created 5 years 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/task_management/providers/browser_process_task.cc ('k') | chrome/browser/task_management/providers/task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698