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

Unified Diff: native_client_sdk/src/libraries/nacl_mounts/mount.h

Issue 12166002: Cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_mounts/mount.h
diff --git a/native_client_sdk/src/libraries/nacl_mounts/mount.h b/native_client_sdk/src/libraries/nacl_mounts/mount.h
index 108fa7b4b9cdd8c67773d31cb97d5d378a7b37d5..e1da7259add1822241e1a0229b3500ad15618ed2 100644
--- a/native_client_sdk/src/libraries/nacl_mounts/mount.h
+++ b/native_client_sdk/src/libraries/nacl_mounts/mount.h
@@ -8,6 +8,7 @@
#include <map>
#include <string>
+#include "nacl_mounts/inode_pool.h"
#include "nacl_mounts/mount_node.h"
#include "nacl_mounts/path.h"
#include "utils/macros.h"
@@ -42,9 +43,9 @@ class Mount : public RefObject {
void AcquireNode(MountNode* node);
void ReleaseNode(MountNode* node);
- // Open a node at |path|. The resulting MountNode is created with a ref
- // count of 1, and will be Closed when the last reference is released.
- virtual MountNode *Open(const Path& path, int mode) = 0;
+ // Open a node at |path| with the specified open flags. The resulting
+ // MountNode is created with a ref count of 1.
+ virtual MountNode *Open(const Path& path, int o_flags) = 0;
// Unlink, Mkdir, Rmdir will affect the both the RefCount
// and the nlink number in the stat object.
@@ -56,18 +57,14 @@ class Mount : public RefObject {
// Convert from R,W,R/W open flags to STAT permission flags
static int OpenModeToPermission(int mode);
- unsigned int num_nodes() const { return num_nodes_; }
-
- // Should only be called by MountNode when a new node is created with this
- // Mount as its parent.
- void OnNodeCreated();
- void OnNodeDestroyed();
+ void OnNodeCreated(MountNode* node) ;
+ void OnNodeDestroyed(MountNode* node);
protected:
// Device number for the mount.
int dev_;
- unsigned int num_nodes_;
PepperInterface* ppapi_; // Weak reference.
+ INodePool inode_pool_;
private:
// May only be called by the KernelProxy when the Kernel's
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/library.dsc ('k') | native_client_sdk/src/libraries/nacl_mounts/mount.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698