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

Side by Side Diff: chrome/nacl/nacl_thread.cc

Issue 4810002: NaCl: Remove second variant of MakeSharedMemorySegmentViaIPC() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/render_process_impl.cc » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/nacl/nacl_thread.h" 5 #include "chrome/nacl/nacl_thread.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "chrome/common/notification_service.h" 9 #include "chrome/common/notification_service.h"
10 #include "chrome/common/nacl_messages.h" 10 #include "chrome/common/nacl_messages.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 void NaClThread::OnControlMessageReceived(const IPC::Message& msg) { 78 void NaClThread::OnControlMessageReceived(const IPC::Message& msg) {
79 IPC_BEGIN_MESSAGE_MAP(NaClThread, msg) 79 IPC_BEGIN_MESSAGE_MAP(NaClThread, msg)
80 IPC_MESSAGE_HANDLER(NaClProcessMsg_Start, OnStartSelLdr) 80 IPC_MESSAGE_HANDLER(NaClProcessMsg_Start, OnStartSelLdr)
81 IPC_END_MESSAGE_MAP() 81 IPC_END_MESSAGE_MAP()
82 } 82 }
83 83
84 void NaClThread::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) { 84 void NaClThread::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) {
85 #if defined(OS_LINUX) 85 #if defined(OS_LINUX)
86 nacl::SetCreateMemoryObjectFunc( 86 nacl::SetCreateMemoryObjectFunc(
87 renderer_sandbox_support::MakeSharedMemorySegmentViaIPCExecutable); 87 renderer_sandbox_support::MakeSharedMemorySegmentViaIPC);
88 #elif defined(OS_MACOSX) 88 #elif defined(OS_MACOSX)
89 nacl::SetCreateMemoryObjectFunc(CreateMemoryObject); 89 nacl::SetCreateMemoryObjectFunc(CreateMemoryObject);
90 CHECK(handles.size() >= 1); 90 CHECK(handles.size() >= 1);
91 g_shm_fd = nacl::ToNativeHandle(handles[handles.size() - 1]); 91 g_shm_fd = nacl::ToNativeHandle(handles[handles.size() - 1]);
92 handles.pop_back(); 92 handles.pop_back();
93 #endif 93 #endif
94 scoped_array<NaClHandle> array(new NaClHandle[handles.size()]); 94 scoped_array<NaClHandle> array(new NaClHandle[handles.size()]);
95 for (size_t i = 0; i < handles.size(); i++) { 95 for (size_t i = 0; i < handles.size(); i++) {
96 array[i] = nacl::ToNativeHandle(handles[i]); 96 array[i] = nacl::ToNativeHandle(handles[i]);
97 } 97 }
98 NaClMainForChromium(static_cast<int>(handles.size()), array.get(), 98 NaClMainForChromium(static_cast<int>(handles.size()), array.get(),
99 debug_enabled_); 99 debug_enabled_);
100 } 100 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/render_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698