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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/mount_node_mem.h

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem Created 7 years, 5 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
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_MEM_H_ 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_MEM_H_
6 #define LIBRARIES_NACL_IO_MOUNT_NODE_MEM_H_ 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_MEM_H_
7 7
8 #include "nacl_io/mount_node.h" 8 #include "nacl_io/mount_node.h"
9 9
10 namespace nacl_io {
11
10 class MountNodeMem : public MountNode { 12 class MountNodeMem : public MountNode {
11 public: 13 public:
12 explicit MountNodeMem(Mount* mount); 14 explicit MountNodeMem(Mount* mount);
13 15
14 protected: 16 protected:
15 virtual ~MountNodeMem(); 17 virtual ~MountNodeMem();
16 18
17 public: 19 public:
18 // Normal read/write operations on a file 20 // Normal read/write operations on a file
19 virtual Error Read(size_t offs, void* buf, size_t count, int* out_bytes); 21 virtual Error Read(size_t offs, void* buf, size_t count, int* out_bytes);
20 virtual Error Write(size_t offs, 22 virtual Error Write(size_t offs,
21 const void* buf, 23 const void* buf,
22 size_t count, 24 size_t count,
23 int* out_bytes); 25 int* out_bytes);
24 virtual Error FTruncate(off_t size); 26 virtual Error FTruncate(off_t size);
25 27
26 private: 28 private:
27 char* data_; 29 char* data_;
28 size_t capacity_; 30 size_t capacity_;
29 friend class MountMem; 31 friend class MountMem;
30 }; 32 };
31 33
34 } // namespace nacl_io
35
32 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_MEM_H_ 36 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_MEM_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_node_http.cc ('k') | native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698