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

Side by Side Diff: components/nacl/browser/nacl_process_host.cc

Issue 1882353002: nacl: Remove unnecessary reference to BrokerAddTargetPeer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/nacl/browser/nacl_process_host.h" 5 #include "components/nacl/browser/nacl_process_host.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 delete this; 712 delete this;
713 } else if (!StartNaClExecution()) { 713 } else if (!StartNaClExecution()) {
714 delete this; 714 delete this;
715 } 715 }
716 } 716 }
717 717
718 void NaClProcessHost::ReplyToRenderer( 718 void NaClProcessHost::ReplyToRenderer(
719 ScopedChannelHandle ppapi_channel_handle, 719 ScopedChannelHandle ppapi_channel_handle,
720 ScopedChannelHandle trusted_channel_handle, 720 ScopedChannelHandle trusted_channel_handle,
721 ScopedChannelHandle manifest_service_channel_handle) { 721 ScopedChannelHandle manifest_service_channel_handle) {
722 #if defined(OS_WIN)
723 // If we are on 64-bit Windows, the NaCl process's sandbox is
724 // managed by a different process from the renderer's sandbox. We
725 // need to inform the renderer's sandbox about the NaCl process so
726 // that the renderer can send handles to the NaCl process using
727 // BrokerDuplicateHandle().
728 if (RunningOnWOW64()) {
729 if (!content::BrokerAddTargetPeer(process_->GetData().handle)) {
730 SendErrorToRenderer("BrokerAddTargetPeer() failed");
731 return;
732 }
733 }
734 #endif
735
736 // Hereafter, we always send an IPC message with handles created above 722 // Hereafter, we always send an IPC message with handles created above
737 // which, on Windows, are not closable in this process. 723 // which, on Windows, are not closable in this process.
738 std::string error_message; 724 std::string error_message;
739 base::SharedMemoryHandle crash_info_shmem_renderer_handle; 725 base::SharedMemoryHandle crash_info_shmem_renderer_handle;
740 if (!crash_info_shmem_.ShareToProcess(nacl_host_message_filter_->PeerHandle(), 726 if (!crash_info_shmem_.ShareToProcess(nacl_host_message_filter_->PeerHandle(),
741 &crash_info_shmem_renderer_handle)) { 727 &crash_info_shmem_renderer_handle)) {
742 // On error, we do not send "IPC::ChannelHandle"s to the renderer process. 728 // On error, we do not send "IPC::ChannelHandle"s to the renderer process.
743 // Note that some other FDs/handles still get sent to the renderer, but 729 // Note that some other FDs/handles still get sent to the renderer, but
744 // will be closed there. 730 // will be closed there.
745 ppapi_channel_handle.reset(); 731 ppapi_channel_handle.reset();
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 NaClStartDebugExceptionHandlerThread( 1292 NaClStartDebugExceptionHandlerThread(
1307 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), 1293 std::move(process), info, base::ThreadTaskRunnerHandle::Get(),
1308 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, 1294 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker,
1309 weak_factory_.GetWeakPtr())); 1295 weak_factory_.GetWeakPtr()));
1310 return true; 1296 return true;
1311 } 1297 }
1312 } 1298 }
1313 #endif 1299 #endif
1314 1300
1315 } // namespace nacl 1301 } // namespace nacl
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698