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

Unified Diff: components/nacl/browser/nacl_process_host.h

Issue 1094653003: Refactor NaClProcessHost. Reduce chances to leak the resource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/nacl/browser/nacl_process_host.h
diff --git a/components/nacl/browser/nacl_process_host.h b/components/nacl/browser/nacl_process_host.h
index e7e0135aecb8e69bd971abc727b4d78aa5f3d7e1..b244e08bc3d5511979a82471c8b39496c9cfb557 100644
--- a/components/nacl/browser/nacl_process_host.h
+++ b/components/nacl/browser/nacl_process_host.h
@@ -111,6 +111,8 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
content::BrowserPpapiHost* browser_ppapi_host() { return ppapi_host_.get(); }
private:
+ class ScopedChannelHandle;
+
void LaunchNaClGdb();
// Mark the process as using a particular GDB debug stub port and notify
@@ -142,10 +144,10 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
// Sends the reply message to the renderer who is waiting for the plugin
// to load. Returns true on success.
- bool ReplyToRenderer(
- const IPC::ChannelHandle& ppapi_channel_handle,
- const IPC::ChannelHandle& trusted_channel_handle,
- const IPC::ChannelHandle& manifest_service_channel_handle);
+ void ReplyToRenderer(
+ ScopedChannelHandle ppapi_channel_handle,
+ ScopedChannelHandle trusted_channel_handle,
+ ScopedChannelHandle manifest_service_channel_handle);
// Sends the reply with error message to the renderer.
void SendErrorToRenderer(const std::string& error_message);
« no previous file with comments | « no previous file | components/nacl/browser/nacl_process_host.cc » ('j') | components/nacl/browser/nacl_process_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698