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

Unified Diff: mojo/system/core.cc

Issue 484893004: Mojo: Make Core own a PlatformSupport, and plumb it through to Channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 4 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/system/core.h ('k') | mojo/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « mojo/system/core.h ('k') | mojo/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698