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

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

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.h
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h
index 634017094921913ac039d8e371e61ad52d405a76..654b513fd863e19f44152997a28e5de812296818 100644
--- a/content/public/test/mock_render_process_host.h
+++ b/content/public/test/mock_render_process_host.h
@@ -103,6 +103,10 @@ class MockRenderProcessHost : public RenderProcessHost {
is_isolated_guest_ = is_isolated_guest;
}
+ void SetProcessHandle(int new_handle) {
+ process_handle.reset(new int(new_handle));
+ }
+
private:
// Stores IPC messages that would have been sent to the renderer.
IPC::TestSink sink_;
@@ -118,6 +122,7 @@ class MockRenderProcessHost : public RenderProcessHost {
bool fast_shutdown_started_;
bool deletion_callback_called_;
bool is_isolated_guest_;
+ scoped_ptr<int> process_handle;
Daniel Erat 2014/08/18 20:43:05 is this portable across platforms? base/process/pr
Daniel Nishi 2014/08/19 19:24:21 Done.
DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);
};

Powered by Google App Engine
This is Rietveld 408576698