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

Unified Diff: third_party/mojo/src/mojo/edk/embedder/test_embedder.cc

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup Created 5 years, 3 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
Index: third_party/mojo/src/mojo/edk/embedder/test_embedder.cc
diff --git a/third_party/mojo/src/mojo/edk/embedder/test_embedder.cc b/third_party/mojo/src/mojo/edk/embedder/test_embedder.cc
index bb99819a40ca9a6dccad25ba9d964856a9224425..23e485eb2c71f081bbe12dbb7d7db0c2bb6c1f98 100644
--- a/third_party/mojo/src/mojo/edk/embedder/test_embedder.cc
+++ b/third_party/mojo/src/mojo/edk/embedder/test_embedder.cc
@@ -8,10 +8,13 @@
#include "base/memory/scoped_ptr.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder_internal.h"
-#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h"
+#include "third_party/mojo/src/mojo/edk/embedder/platform_support.h"
#include "third_party/mojo/src/mojo/edk/system/channel_manager.h"
#include "third_party/mojo/src/mojo/edk/system/core.h"
#include "third_party/mojo/src/mojo/edk/system/handle_table.h"
+#include "../../../../../../mojo/edk/system/core.h"
+#include "../../../../../../mojo/edk/embedder/embedder_internal.h"
+#include "../../../../../../mojo/edk/embedder/simple_platform_support.h"
namespace mojo {
@@ -40,10 +43,6 @@ bool ShutdownCheckNoLeaks(Core* core) {
namespace embedder {
namespace test {
-void InitWithSimplePlatformSupport() {
- Init(make_scoped_ptr(new SimplePlatformSupport()));
-}
-
bool Shutdown() {
// If |InitIPCSupport()| was called, then |ShutdownIPCSupport()| must have
// been called first.
@@ -58,6 +57,16 @@ bool Shutdown() {
delete internal::g_platform_support;
internal::g_platform_support = nullptr;
+
+ // TODO(use_chrome_edk): temporary to match mojo::embedder::Init
+ CHECK(mojo::edk::internal::g_core);
+ delete mojo::edk::internal::g_core;
+ mojo::edk::internal::g_core = nullptr;
+
+ CHECK(mojo::edk::internal::g_platform_support);
+ delete mojo::edk::internal::g_platform_support;
+ mojo::edk::internal::g_platform_support = nullptr;
+
return rv;
}

Powered by Google App Engine
This is Rietveld 408576698