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

Unified Diff: mojo/edk/embedder/embedder.cc

Issue 1554443003: Stop linking in the old Mojo EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and fix new flaky test Created 4 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/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder.cc
diff --git a/mojo/edk/embedder/embedder.cc b/mojo/edk/embedder/embedder.cc
index 4353f9b3ce51e507a0ced57ac383f01bab976aa5..eff59418f260ad42311b84aa06365f731044470d 100644
--- a/mojo/edk/embedder/embedder.cc
+++ b/mojo/edk/embedder/embedder.cc
@@ -8,7 +8,6 @@
#include <stdint.h>
#include <utility>
-
#include "base/atomicops.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -43,10 +42,6 @@ Core* g_core = nullptr;
ProcessDelegate* g_process_delegate;
base::TaskRunner* g_io_thread_task_runner = nullptr;
-Core* GetCore() {
- return g_core;
-}
-
} // namespace internal
void SetMaxMessageSize(size_t bytes) {
@@ -77,9 +72,7 @@ void SetParentPipeHandle(ScopedPlatformHandle pipe) {
}
void Init() {
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch("use-new-edk") && !internal::g_broker)
+ if (!internal::g_broker)
BrokerState::GetInstance();
DCHECK(!internal::g_platform_support);
@@ -89,6 +82,12 @@ void Init() {
internal::g_core = new Core(internal::g_platform_support);
}
+void Init(scoped_refptr<base::TaskRunner> io_thread_task_runner) {
+ Init();
+ DCHECK(!internal::g_io_thread_task_runner);
+ internal::g_io_thread_task_runner = io_thread_task_runner.get();
+}
+
MojoResult AsyncWait(MojoHandle handle,
MojoHandleSignals signals,
const base::Callback<void(MojoResult)>& callback) {
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698