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

Unified Diff: content/public/test/mock_render_process_host.cc

Issue 472383002: Add ProcessPowerCollector to audit power information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments and fixing some memory issues. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/mock_render_process_host.cc
diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc
index 1f5de5f22faadcfe9467e5f2366cbe667662a694..baf646e1cb4b24d0ef34a446db65d30eb6d70dff 100644
--- a/content/public/test/mock_render_process_host.cc
+++ b/content/public/test/mock_render_process_host.cc
@@ -122,6 +122,8 @@ void MockRenderProcessHost::DumpHandles() {
base::ProcessHandle MockRenderProcessHost::GetHandle() const {
// Return the current-process handle for the IPC::GetFileHandleForProcess
// function.
+ if (process_handle)
+ return base::ProcessHandle(*process_handle);
return base::Process::Current().handle();
}

Powered by Google App Engine
This is Rietveld 408576698