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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/file_utils.h

Issue 15697019: Parametrize names of llc and ld nexes by reading them from the resource info JSON file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win build Created 7 years, 7 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 (c) 2013 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 // Some common file utilities for plugin code.
6
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_UTILS_H_
8 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_UTILS_H_
9
10 #include "native_client/src/include/nacl_string.h"
11 #include "native_client/src/include/portability_io.h"
12 #include "ppapi/c/pp_stdint.h"
13
14 namespace plugin { namespace file_utils {
jvoung (off chromium) 2013/05/23 20:33:19 c++ readability: "When declaring nested namespaces
eliben 2013/05/23 20:54:25 Done.
15
16 enum StatusCode {
17 SUCCESS = 0,
18 ERROR_MEM_ALLOC = 1,
19 ERROR_OPEN = 2,
20 ERROR_FILE_TOO_LARGE = 3,
21 ERROR_STAT = 4,
22 ERROR_READ = 5
23 };
24
25 // Slurp the whole contents of the given file (fd - open file descriptor) into
26 // out_buf. max_size_to_read is the maximal allowed size of the file.
27 // If the file turns out to be larger, an error is returned. In any case,
28 // fd is closed.
29 StatusCode SlurpFile(int32_t fd,
30 nacl::string& out_buf,
31 size_t max_size_to_read = (1 << 20));
32
33 } // namespace file_utils
jvoung (off chromium) 2013/05/23 20:33:19 2 spaces between } and // namespace
eliben 2013/05/23 20:54:25 Done.
34 } // namespace plugin
35
36 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_UTILS_H_
37
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698