OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/ppb_nacl_private_impl.h" | 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 int32_t num_processors; | 494 int32_t num_processors; |
495 IPC::Sender* sender = content::RenderThread::Get(); | 495 IPC::Sender* sender = content::RenderThread::Get(); |
496 DCHECK(sender); | 496 DCHECK(sender); |
497 if(!sender->Send(new NaClHostMsg_NaClGetNumProcessors(&num_processors))) { | 497 if(!sender->Send(new NaClHostMsg_NaClGetNumProcessors(&num_processors))) { |
498 return 1; | 498 return 1; |
499 } | 499 } |
500 return num_processors; | 500 return num_processors; |
501 } | 501 } |
502 | 502 |
503 PP_Bool IsNonSFIModeEnabled() { | 503 PP_Bool IsNonSFIModeEnabled() { |
504 #if defined(OS_LINUX) | 504 // Note that this only indicates whether non-sfi mode *can* run for a given |
505 // platform and if nonsfi manifest entries are preferred. There can be other | |
506 // restrictions which prevent a particular module from launching. See | |
507 // NaClProcessHost::Launch which makes the final determination. | |
508 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | |
Mark Seaborn
2014/05/08 01:06:02
Same comment as in other file
elijahtaylor1
2014/05/08 20:00:24
Done.
| |
509 return PP_TRUE; | |
510 #elif defined(OS_LINUX) || defined(OS_CHROMEOS) | |
Mark Seaborn
2014/05/08 01:06:02
Same here too
elijahtaylor1
2014/05/08 20:00:24
Done.
| |
505 return PP_FromBool(CommandLine::ForCurrentProcess()->HasSwitch( | 511 return PP_FromBool(CommandLine::ForCurrentProcess()->HasSwitch( |
506 switches::kEnableNaClNonSfiMode)); | 512 switches::kEnableNaClNonSfiMode)); |
507 #else | 513 #else |
508 return PP_FALSE; | 514 return PP_FALSE; |
509 #endif | 515 #endif |
510 } | 516 } |
511 | 517 |
512 int32_t GetNexeFd(PP_Instance instance, | 518 int32_t GetNexeFd(PP_Instance instance, |
513 const char* pexe_url, | 519 const char* pexe_url, |
514 uint32_t abi_version, | 520 uint32_t abi_version, |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1033 &DownloadManifestToBuffer | 1039 &DownloadManifestToBuffer |
1034 }; | 1040 }; |
1035 | 1041 |
1036 } // namespace | 1042 } // namespace |
1037 | 1043 |
1038 const PPB_NaCl_Private* GetNaClPrivateInterface() { | 1044 const PPB_NaCl_Private* GetNaClPrivateInterface() { |
1039 return &nacl_interface; | 1045 return &nacl_interface; |
1040 } | 1046 } |
1041 | 1047 |
1042 } // namespace nacl | 1048 } // namespace nacl |
OLD | NEW |