| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 <pthread.h> | 5 #include <pthread.h> |
| 6 #include <unistd.h> | 6 #include <unistd.h> |
| 7 | 7 |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // ipc_message_attachment_set.h depends on C++11 which nacl-g++ does not | 21 // ipc_message_attachment_set.h depends on C++11 which nacl-g++ does not |
| 22 // fully support. | 22 // fully support. |
| 23 #include "ipc/ipc_message_attachment_set.h" | 23 #include "ipc/ipc_message_attachment_set.h" |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 std::string g_last_error; | 28 std::string g_last_error; |
| 29 pp::Instance* g_instance = NULL; | 29 pp::Instance* g_instance = NULL; |
| 30 | 30 |
| 31 // This should be the same as MessageAttachmentSet::kMaxDescriptorsPerMessage in | 31 // This should be larger than or equal to |
| 32 // MessageAttachmentSet::kMaxDescriptorsPerMessage in |
| 32 // ipc/ipc_message_attachment_set.h. | 33 // ipc/ipc_message_attachment_set.h. |
| 33 const size_t kMaxDescriptorsPerMessage = 128; | 34 const size_t kMaxDescriptorsPerMessage = 128; |
| 34 | 35 |
| 35 #if defined(__clang__) | 36 #if defined(__clang__) |
| 36 static_assert(kMaxDescriptorsPerMessage == | 37 static_assert(kMaxDescriptorsPerMessage >= |
| 37 IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage, | 38 IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage, |
| 38 "kMaxDescriptorsPerMessage is not up to date"); | 39 "kMaxDescriptorsPerMessage is not up to date"); |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 // Returns true if the resource file whose name is |key| exists and its content | 42 // Returns true if the resource file whose name is |key| exists and its content |
| 42 // matches |content|. | 43 // matches |content|. |
| 43 bool LoadManifestInternal(nacl_irt_resource_open* nacl_irt_resource_open, | 44 bool LoadManifestInternal(nacl_irt_resource_open* nacl_irt_resource_open, |
| 44 const std::string& key, | 45 const std::string& key, |
| 45 const std::string& content) { | 46 const std::string& content) { |
| 46 int desc; | 47 int desc; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 170 |
| 170 } // namespace | 171 } // namespace |
| 171 | 172 |
| 172 namespace pp { | 173 namespace pp { |
| 173 | 174 |
| 174 Module* CreateModule() { | 175 Module* CreateModule() { |
| 175 return new MyModule(); | 176 return new MyModule(); |
| 176 } | 177 } |
| 177 | 178 |
| 178 } // namespace pp | 179 } // namespace pp |
| OLD | NEW |