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

Unified Diff: mojo/system/core_impl.h

Issue 136793026: Mojo: Add leak detection to mojo::embedder::test::Shutdown(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | mojo/system/embedder/embedder_unittest.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 339dfc86779db8b54d128870b1fcc97d17ce7e5e..60577d16f35c28e063942cb40dd28176555fe4b9 100644
--- a/mojo/system/core_impl.h
+++ b/mojo/system/core_impl.h
@@ -14,12 +14,17 @@
#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*);
sky 2014/01/17 20:29:01 I believe the style guide says you should name the
+}
+
// |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 {
@@ -80,6 +85,8 @@ class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core {
uint32_t num_bytes_read) OVERRIDE;
private:
+ friend bool internal::ShutdownCheckNoLeaks(CoreImpl*);
+
// The |busy| member is used only to deal with functions (in particular
// |WriteMessage()|) that want to hold on to a dispatcher and later remove it
// from the handle table, without holding on to the handle table lock.
@@ -145,7 +152,6 @@ class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core {
};
} // namespace system
-
} // namespace mojo
#endif // MOJO_SYSTEM_CORE_IMPL_H_
« no previous file with comments | « no previous file | mojo/system/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698