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

Unified Diff: mojo/edk/system/core.h

Issue 898623002: Make mojo::system::Core not own the PlatformSupport. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: foo Created 5 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 | « mojo/edk/system/channel.h ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.h
diff --git a/mojo/edk/system/core.h b/mojo/edk/system/core.h
index 2baa7210b11422db89b848e9d71675eb45047780..7833193c44f86c036359b7596ef68bd5a9ac7dc6 100644
--- a/mojo/edk/system/core.h
+++ b/mojo/edk/system/core.h
@@ -39,7 +39,9 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
// ---------------------------------------------------------------------------
// These methods are only to be used by via the embedder API (and internally):
- explicit Core(scoped_ptr<embedder::PlatformSupport> platform_support);
+
+ // |*platform_support| must outlive this object.
+ explicit Core(embedder::PlatformSupport* platform_support);
virtual ~Core();
// Adds |dispatcher| to the handle table, returning the handle for it. Returns
@@ -59,7 +61,7 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
base::Callback<void(MojoResult)> callback);
embedder::PlatformSupport* platform_support() const {
- return platform_support_.get();
+ return platform_support_;
}
// ---------------------------------------------------------------------------
@@ -162,7 +164,7 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
uint32_t* result_index,
HandleSignalsState* signals_states);
- const scoped_ptr<embedder::PlatformSupport> platform_support_;
+ embedder::PlatformSupport* const platform_support_;
// TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we
// had them).
« no previous file with comments | « mojo/edk/system/channel.h ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698