Commit 9c8755d3 authored by teravest@chromium.org's avatar teravest@chromium.org

Pepper: Remove BrowserPpapiHostImpl::in_process().

It's not necessary to have this method.

BUG=313943

Review URL: https://codereview.chromium.org/126083002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243746 0039d316-1c4b-4281-b951-d872f2087c98
parent 26af6b6f
...@@ -76,7 +76,7 @@ ppapi::host::PpapiHost* BrowserPpapiHostImpl::GetPpapiHost() { ...@@ -76,7 +76,7 @@ ppapi::host::PpapiHost* BrowserPpapiHostImpl::GetPpapiHost() {
base::ProcessHandle BrowserPpapiHostImpl::GetPluginProcessHandle() const { base::ProcessHandle BrowserPpapiHostImpl::GetPluginProcessHandle() const {
// Handle should previously have been set before use. // Handle should previously have been set before use.
DCHECK(plugin_process_handle_ != base::kNullProcessHandle); DCHECK(in_process_ || plugin_process_handle_ != base::kNullProcessHandle);
return plugin_process_handle_; return plugin_process_handle_;
} }
......
...@@ -62,7 +62,6 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost { ...@@ -62,7 +62,6 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
plugin_process_handle_ = handle; plugin_process_handle_ = handle;
} }
bool in_process() const { return in_process_; }
bool external_plugin() const { return external_plugin_; } bool external_plugin() const { return external_plugin_; }
// These two functions are notifications that an instance has been created // These two functions are notifications that an instance has been created
......
...@@ -450,13 +450,11 @@ void PepperFileIOHost::SendOpenErrorReply( ...@@ -450,13 +450,11 @@ void PepperFileIOHost::SendOpenErrorReply(
bool PepperFileIOHost::AddFileToReplyContext( bool PepperFileIOHost::AddFileToReplyContext(
int32_t open_flags, int32_t open_flags,
ppapi::host::ReplyMessageContext* reply_context) const { ppapi::host::ReplyMessageContext* reply_context) const {
base::ProcessId plugin_process_id; base::ProcessId plugin_process_id =
if (browser_ppapi_host_->in_process()) { base::GetProcId(browser_ppapi_host_->GetPluginProcessHandle());
if (plugin_process_id == base::kNullProcessId)
plugin_process_id = resolved_render_process_id_; plugin_process_id = resolved_render_process_id_;
} else {
plugin_process_id = base::GetProcId(
browser_ppapi_host_->GetPluginProcessHandle());
}
IPC::PlatformFileForTransit transit_file = BrokerGetFileHandleForProcess( IPC::PlatformFileForTransit transit_file = BrokerGetFileHandleForProcess(
file_, plugin_process_id, false); file_, plugin_process_id, false);
if (transit_file == IPC::InvalidPlatformFileForTransit()) if (transit_file == IPC::InvalidPlatformFileForTransit())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment