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

Side by Side Diff: chrome/browser/task_manager/child_process_resource_provider.cc

Issue 1081323003: Convert renderer JS memory usage reporting to use Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@utility-process-report-js-memory
Patch Set: Rebase and fix tests. Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_manager/child_process_resource_provider.h" 5 #include "chrome/browser/task_manager/child_process_resource_provider.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 break; 246 break;
247 case content::PROCESS_TYPE_UNKNOWN: 247 case content::PROCESS_TYPE_UNKNOWN:
248 NOTREACHED() << "Need localized name for child process type."; 248 NOTREACHED() << "Need localized name for child process type.";
249 } 249 }
250 250
251 return title; 251 return title;
252 } 252 }
253 253
254 void ChildProcessResource::Refresh() { 254 void ChildProcessResource::Refresh() {
255 if (resource_usage_) 255 if (resource_usage_)
256 resource_usage_->Refresh(); 256 resource_usage_->Refresh(base::Closure());
257 } 257 }
258 258
259 bool ChildProcessResource::ReportsV8MemoryStats() const { 259 bool ChildProcessResource::ReportsV8MemoryStats() const {
260 if (resource_usage_) 260 if (resource_usage_)
261 return resource_usage_->ReportsV8MemoryStats(); 261 return resource_usage_->ReportsV8MemoryStats();
262 return false; 262 return false;
263 } 263 }
264 264
265 size_t ChildProcessResource::GetV8MemoryAllocated() const { 265 size_t ChildProcessResource::GetV8MemoryAllocated() const {
266 if (resource_usage_) 266 if (resource_usage_)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // This is called on the UI thread. 401 // This is called on the UI thread.
402 void ChildProcessResourceProvider::ChildProcessDataRetreived( 402 void ChildProcessResourceProvider::ChildProcessDataRetreived(
403 const std::vector<content::ChildProcessData>& child_processes) { 403 const std::vector<content::ChildProcessData>& child_processes) {
404 for (size_t i = 0; i < child_processes.size(); ++i) 404 for (size_t i = 0; i < child_processes.size(); ++i)
405 AddToTaskManager(child_processes[i]); 405 AddToTaskManager(child_processes[i]);
406 406
407 task_manager_->model()->NotifyDataReady(); 407 task_manager_->model()->NotifyDataReady();
408 } 408 }
409 409
410 } // namespace task_manager 410 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.cc ('k') | chrome/browser/task_manager/renderer_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698