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

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

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review Created 4 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_manager/providers/child_process_task.h" 5 #include "chrome/browser/task_manager/providers/child_process_task.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 if (interfaces) 129 if (interfaces)
130 interfaces->GetInterface(std::move(resource_reporter)); 130 interfaces->GetInterface(std::move(resource_reporter));
131 } 131 }
132 132
133 // Creates the Mojo service wrapper that will be used to sample the V8 memory 133 // Creates the Mojo service wrapper that will be used to sample the V8 memory
134 // usage of the browser child process whose unique ID is 134 // usage of the browser child process whose unique ID is
135 // |unique_child_process_id|. 135 // |unique_child_process_id|.
136 ProcessResourceUsage* CreateProcessResourcesSampler( 136 ProcessResourceUsage* CreateProcessResourcesSampler(
137 int unique_child_process_id) { 137 int unique_child_process_id) {
138 chrome::mojom::ResourceUsageReporterPtr usage_reporter; 138 chrome::mojom::ResourceUsageReporterPtr usage_reporter;
139 chrome::mojom::ResourceUsageReporterRequest request = 139 chrome::mojom::ResourceUsageReporterRequest request(&usage_reporter);
140 mojo::MakeRequest(&usage_reporter);
141 content::BrowserThread::PostTask( 140 content::BrowserThread::PostTask(
142 content::BrowserThread::IO, 141 content::BrowserThread::IO,
143 FROM_HERE, 142 FROM_HERE,
144 base::Bind(&ConnectResourceReporterOnIOThread, 143 base::Bind(&ConnectResourceReporterOnIOThread,
145 unique_child_process_id, base::Passed(&request))); 144 unique_child_process_id, base::Passed(&request)));
146 145
147 return new ProcessResourceUsage(std::move(usage_reporter)); 146 return new ProcessResourceUsage(std::move(usage_reporter));
148 } 147 }
149 148
150 bool UsesV8Memory(int process_type) { 149 bool UsesV8Memory(int process_type) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 230
232 int64_t ChildProcessTask::GetV8MemoryAllocated() const { 231 int64_t ChildProcessTask::GetV8MemoryAllocated() const {
233 return v8_memory_allocated_; 232 return v8_memory_allocated_;
234 } 233 }
235 234
236 int64_t ChildProcessTask::GetV8MemoryUsed() const { 235 int64_t ChildProcessTask::GetV8MemoryUsed() const {
237 return v8_memory_used_; 236 return v8_memory_used_;
238 } 237 }
239 238
240 } // namespace task_manager 239 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/importer/external_process_importer_client.cc ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698