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

Side by Side Diff: ppapi/nacl_irt/irt_manifest.cc

Issue 249183004: Implement open_resource in non-SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
OLDNEW
(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 *fd = -1;
teravest 2014/04/24 20:00:52 Why set |fd| on failure? It seems unnecessary.
hidehiko 2014/04/25 05:53:54 Ok, then let's move this to ManifestService::OpenR
23 return EIO;
24 }
25
26 return (*fd == -1) ? ENOENT : 0;
27 }
28
29 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698