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

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

Issue 9956156: Add mount sources for a MountNode (inode) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/mount_node_dir.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5
6 #ifndef LIBRARIES_NACL_MOUNTS_MOUNT_NODE_MEM_H_ 6 #ifndef LIBRARIES_NACL_MOUNTS_MOUNT_NODE_MEM_H_
7 #define LIBRARIES_NACL_MOUNTS_MOUNT_NODE_MEM_H_ 7 #define LIBRARIES_NACL_MOUNTS_MOUNT_NODE_MEM_H_
8 8
9 #include "mount_node.h" 9 #include "nacl_mounts/mount_node.h"
10 10
11 class MountNodeMem : public MountNode { 11 class MountNodeMem : public MountNode {
12 public: 12 public:
13 MountNodeMem(Mount* mount, int ino, int dev); 13 MountNodeMem(Mount* mount, int ino, int dev);
14 14
15 protected: 15 protected:
16 virtual ~MountNodeMem(); 16 virtual ~MountNodeMem();
17 virtual bool Init(int mode, short uid, short gid); 17 virtual bool Init(int mode, short uid, short gid);
18 18
19 public: 19 public:
20 // Normal read/write operations on a file 20 // Normal read/write operations on a file
21 virtual int Read(size_t offs, void* buf, size_t count); 21 virtual int Read(size_t offs, void* buf, size_t count);
22 virtual int Write(size_t offs, const void* buf, size_t count); 22 virtual int Write(size_t offs, const void* buf, size_t count);
23 virtual int Truncate(size_t size); 23 virtual int Truncate(size_t size);
24 24
25 private: 25 private:
26 char* data_; 26 char* data_;
27 size_t capacity_; 27 size_t capacity_;
28 friend class Mount; 28 friend class MountMem;
29 }; 29 };
30 30
31 #endif // LIBRARIES_NACL_MOUNTS_MOUNT_NODE_MEM_H_ 31 #endif // LIBRARIES_NACL_MOUNTS_MOUNT_NODE_MEM_H_
32 32
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/mount_node_dir.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698