Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ppapi/nacl_irt/irt_manifest.h" | |
| 6 | |
| 7 #include <errno.h> | |
| 8 | |
| 9 #include "ppapi/nacl_irt/manifest_service.h" | |
| 10 #include "ppapi/nacl_irt/plugin_startup.h" | |
| 11 | |
| 12 namespace ppapi { | |
| 13 | |
| 14 int IrtOpenResource(const char* file, int* fd) { | |
| 15 // Remove leading '/' character. | |
| 16 if (file[0] == '/') | |
| 17 ++file; | |
| 18 | |
| 19 ManifestService* manifest_service = GetManifestService(); | |
| 20 if (manifest_service == NULL || | |
| 21 !manifest_service->OpenResource(file, fd)) { | |
| 22 return EIO; | |
|
Mark Seaborn
2014/04/26 00:18:59
Does it work to #include native_client/src/trusted
hidehiko
2014/04/28 08:44:27
Done.
| |
| 23 } | |
| 24 | |
| 25 return (*fd == -1) ? ENOENT : 0; | |
| 26 } | |
| 27 | |
| 28 } // namespace ppapi | |
| OLD | NEW |