Index: mojo/system/core.cc |
diff --git a/mojo/system/core.cc b/mojo/system/core.cc |
index 47d63f66580b003ade24e4101d825e44444942b7..82cb1178d761f92d559352e620d4aeb22d9e36ce 100644 |
--- a/mojo/system/core.cc |
+++ b/mojo/system/core.cc |
@@ -9,6 +9,7 @@ |
#include "base/logging.h" |
#include "base/time/time.h" |
#include "mojo/embedder/platform_shared_buffer.h" |
+#include "mojo/embedder/platform_support.h" |
#include "mojo/embedder/simple_platform_support.h" // TODO(vtl): Remove this. |
#include "mojo/public/c/system/macros.h" |
#include "mojo/system/constants.h" |
@@ -75,7 +76,8 @@ namespace system { |
// - Locks at the "INF" level may not have any locks taken while they are |
// held. |
-Core::Core() { |
+// TODO(vtl): This should take a |scoped_ptr<PlatformSupport>| as a parameter. |
+Core::Core() : platform_support_(new embedder::SimplePlatformSupport()) { |
} |
Core::~Core() { |
@@ -463,12 +465,9 @@ MojoResult Core::CreateSharedBuffer( |
if (result != MOJO_RESULT_OK) |
return result; |
- // TODO(vtl): |Core| should have a |PlatformSupport| passed in at creation |
- // time, and we should use that instead. |
- embedder::SimplePlatformSupport platform_support; |
scoped_refptr<SharedBufferDispatcher> dispatcher; |
result = SharedBufferDispatcher::Create( |
- &platform_support, validated_options, num_bytes, &dispatcher); |
+ platform_support(), validated_options, num_bytes, &dispatcher); |
if (result != MOJO_RESULT_OK) { |
DCHECK(!dispatcher); |
return result; |