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

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

Issue 11783112: Remove the NaCl SRPC proxy from Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/nacl.gypi ('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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<nacl::Handle*>(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 if (CommandLine::ForCurrentProcess()->HasSwitch(
132 switches::kEnableNaClSRPCProxy))
133 return PP_NACL_USE_SRPC;
134
135 InstanceInfoMap& map = g_instance_info.Get(); 131 InstanceInfoMap& map = g_instance_info.Get();
136 InstanceInfoMap::iterator it = map.find(instance); 132 InstanceInfoMap::iterator it = map.find(instance);
137 if (it == map.end()) 133 if (it == map.end())
138 return PP_NACL_FAILED; 134 return PP_NACL_FAILED;
139 InstanceInfo instance_info = it->second; 135 InstanceInfo instance_info = it->second;
140 map.erase(it); 136 map.erase(it);
141 137
142 webkit::ppapi::PluginInstance* plugin_instance = 138 webkit::ppapi::PluginInstance* plugin_instance =
143 content::GetHostGlobals()->GetInstance(instance); 139 content::GetHostGlobals()->GetInstance(instance);
144 if (!plugin_instance) 140 if (!plugin_instance)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 &ReportNaClError 275 &ReportNaClError
280 }; 276 };
281 277
282 } // namespace 278 } // namespace
283 279
284 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { 280 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() {
285 return &nacl_interface; 281 return &nacl_interface;
286 } 282 }
287 283
288 #endif // DISABLE_NACL 284 #endif // DISABLE_NACL
OLDNEW
« no previous file with comments | « chrome/nacl.gypi ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698