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

Unified Diff: mojo/system/core_impl.h

Issue 216893005: Mojo: Move the handle table details out of CoreImpl into its own class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile assert Created 6 years, 9 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
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/system/core_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/core_impl.h
diff --git a/mojo/system/core_impl.h b/mojo/system/core_impl.h
index b82f8d29b67b92b212ed063e8705f0dd714da75f..63b4b08b949cb3db330eb8d172b8b61ff640873a 100644
--- a/mojo/system/core_impl.h
+++ b/mojo/system/core_impl.h
@@ -7,24 +7,17 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "mojo/public/system/core_private.h"
+#include "mojo/system/handle_table.h"
#include "mojo/system/system_impl_export.h"
namespace mojo {
namespace system {
-class CoreImpl;
class Dispatcher;
-// Test-only function (defined/used in embedder/test_embedder.cc). Declared here
-// so it can be friended.
-namespace internal {
-bool ShutdownCheckNoLeaks(CoreImpl*);
-}
-
// |CoreImpl| is a singleton object that implements the Mojo system calls. All
// public methods are thread-safe.
class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core {
@@ -131,11 +124,6 @@ class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core {
// invalid.
scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle);
- // Assigns a new handle for the given dispatcher; returns
- // |MOJO_HANDLE_INVALID| on failure (due to hitting resource limits) or if
- // |dispatcher| is null. Must be called under |handle_table_lock_|.
- MojoHandle AddDispatcherNoLock(const scoped_refptr<Dispatcher>& dispatcher);
-
// Internal implementation of |Wait()| and |WaitMany()|; doesn't do basic
// validation of arguments.
MojoResult WaitManyInternal(const MojoHandle* handles,
@@ -147,9 +135,8 @@ class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core {
// TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we
// had them).
- base::Lock handle_table_lock_; // Protects the immediately-following members.
- HandleTableMap handle_table_;
- MojoHandle next_handle_; // Invariant: never |MOJO_HANDLE_INVALID|.
+ base::Lock handle_table_lock_; // Protects |handle_table_|.
+ HandleTable handle_table_;
// ---------------------------------------------------------------------------
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/system/core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698