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

Unified Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc

Issue 725353003: Don't pass ProcessHandle through ChildProcessHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 6 years, 1 month 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/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
index 130245e6022e95266a6e5831463c6f68effa34e5..d9539ee5c59bcb527fa3dd9fa743fdfc9b5ac93e 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
@@ -32,7 +32,8 @@ BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess(
profile_directory,
false /* in_process */,
true /* external_plugin */);
- browser_ppapi_host->set_plugin_process_handle(plugin_child_process);
+ browser_ppapi_host->set_plugin_process(
+ base::Process::DeprecatedGetProcessFromHandle(plugin_child_process));
scoped_refptr<PepperMessageFilter> pepper_message_filter(
new PepperMessageFilter());
@@ -52,7 +53,6 @@ BrowserPpapiHostImpl::BrowserPpapiHostImpl(
bool in_process,
bool external_plugin)
: ppapi_host_(new ppapi::host::PpapiHost(sender, permissions)),
- plugin_process_handle_(base::kNullProcessHandle),
plugin_name_(plugin_name),
plugin_path_(plugin_path),
profile_data_directory_(profile_data_directory),
@@ -78,10 +78,10 @@ ppapi::host::PpapiHost* BrowserPpapiHostImpl::GetPpapiHost() {
return ppapi_host_.get();
}
-base::ProcessHandle BrowserPpapiHostImpl::GetPluginProcessHandle() const {
+const base::Process& BrowserPpapiHostImpl::GetPluginProcess() const {
// Handle should previously have been set before use.
- DCHECK(in_process_ || plugin_process_handle_ != base::kNullProcessHandle);
- return plugin_process_handle_;
+ DCHECK(in_process_ || plugin_process_.IsValid());
+ return plugin_process_;
}
bool BrowserPpapiHostImpl::IsValidInstance(PP_Instance instance) const {

Powered by Google App Engine
This is Rietveld 408576698