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

Side by Side Diff: chrome/renderer/pepper/ppb_nacl_private_impl.cc

Issue 12225154: NaCl: Remove use of the C++ IMC interface; use the C version instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments too Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.cc ('k') | ppapi/api/private/ppb_nacl_private.idl » ('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) 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 "chrome/renderer/pepper/ppb_nacl_private_impl.h" 5 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h"
6 6
7 #ifndef DISABLE_NACL 7 #ifndef DISABLE_NACL
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Don't save instance_info if channel handle is invalid. 115 // Don't save instance_info if channel handle is invalid.
116 bool invalid_handle = instance_info.channel_handle.name.empty(); 116 bool invalid_handle = instance_info.channel_handle.name.empty();
117 #if defined(OS_POSIX) 117 #if defined(OS_POSIX)
118 if (!invalid_handle) 118 if (!invalid_handle)
119 invalid_handle = (instance_info.channel_handle.socket.fd == -1); 119 invalid_handle = (instance_info.channel_handle.socket.fd == -1);
120 #endif 120 #endif
121 if (!invalid_handle) 121 if (!invalid_handle)
122 g_instance_info.Get()[instance] = instance_info; 122 g_instance_info.Get()[instance] = instance_info;
123 123
124 *(static_cast<nacl::Handle*>(imc_handle)) = 124 *(static_cast<NaClHandle*>(imc_handle)) =
125 nacl::ToNativeHandle(result_socket); 125 nacl::ToNativeHandle(result_socket);
126 126
127 return PP_NACL_OK; 127 return PP_NACL_OK;
128 } 128 }
129 129
130 PP_NaClResult StartPpapiProxy(PP_Instance instance) { 130 PP_NaClResult StartPpapiProxy(PP_Instance instance) {
131 InstanceInfoMap& map = g_instance_info.Get(); 131 InstanceInfoMap& map = g_instance_info.Get();
132 InstanceInfoMap::iterator it = map.find(instance); 132 InstanceInfoMap::iterator it = map.find(instance);
133 if (it == map.end()) { 133 if (it == map.end()) {
134 DLOG(ERROR) << "Could not find instance ID"; 134 DLOG(ERROR) << "Could not find instance ID";
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 &ReportNaClError 281 &ReportNaClError
282 }; 282 };
283 283
284 } // namespace 284 } // namespace
285 285
286 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { 286 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() {
287 return &nacl_interface; 287 return &nacl_interface;
288 } 288 }
289 289
290 #endif // DISABLE_NACL 290 #endif // DISABLE_NACL
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.cc ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698