Commit 4090dcce authored by Xi Han's avatar Xi Han Committed by Commit Bot

Plumb pre-created service manager thread when creating BrowserMainLoop.

The service manager thread and (TODO) ServiceManager might be created
before the full browser starts, and we want to reuse them when starting
the full browser. Therefore, we add a pointer of BrowserStartupData in
MainFunctionParams.

Particularly, in this CL, ContentMainRunnerImpl creates and owns a
BrowserStartupData object. It passes a pointer of the BrowserStartupData
through the main function parameter to BrowserMainLoop.

The BrowserStartupData interface was introduced in:
https://crrev.com/c/1117471.

Bug: 846846, 853308
Change-Id: Ie11063227a670cd8d72935131e854ee2b5c46e4e
Reviewed-on: https://chromium-review.googlesource.com/1108178
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574054}
parent 513386a1
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "components/tracing/common/trace_startup.h" #include "components/tracing/common/trace_startup.h"
#include "content/app/mojo/mojo_init.h" #include "content/app/mojo/mojo_init.h"
#include "content/browser/browser_process_sub_thread.h" #include "content/browser/browser_process_sub_thread.h"
#include "content/browser/startup_data_impl.h"
#include "content/common/url_schemes.h" #include "content/common/url_schemes.h"
#include "content/public/app/content_main_delegate.h" #include "content/public/app/content_main_delegate.h"
#include "content/public/common/content_constants.h" #include "content/public/common/content_constants.h"
...@@ -580,10 +581,8 @@ static void RegisterMainThreadFactories() { ...@@ -580,10 +581,8 @@ static void RegisterMainThreadFactories() {
#if !defined(CHROME_MULTIPLE_DLL_CHILD) #if !defined(CHROME_MULTIPLE_DLL_CHILD)
// Run the main function for browser process. // Run the main function for browser process.
// Returns the exit code for this process. // Returns the exit code for this process.
int RunBrowserProcessMain( int RunBrowserProcessMain(const MainFunctionParams& main_function_params,
const MainFunctionParams& main_function_params, ContentMainDelegate* delegate) {
ContentMainDelegate* delegate,
std::unique_ptr<BrowserProcessSubThread> service_manager_thread) {
int exit_code = delegate->RunProcess("", main_function_params); int exit_code = delegate->RunProcess("", main_function_params);
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
// In Android's browser process, the negative exit code doesn't mean the // In Android's browser process, the negative exit code doesn't mean the
...@@ -594,10 +593,7 @@ int RunBrowserProcessMain( ...@@ -594,10 +593,7 @@ int RunBrowserProcessMain(
#else #else
if (exit_code >= 0) if (exit_code >= 0)
return exit_code; return exit_code;
// GetServiceManagerTaskRunnerForEmbedderProcess() needs to be invoked before return BrowserMain(main_function_params);
// Run() for the browser process.
DCHECK(service_manager_thread);
return BrowserMain(main_function_params, std::move(service_manager_thread));
#endif #endif
} }
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD) #endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
...@@ -927,6 +923,10 @@ int ContentMainRunnerImpl::Run() { ...@@ -927,6 +923,10 @@ int ContentMainRunnerImpl::Run() {
// The thread used to start the ServiceManager is handed-off to // The thread used to start the ServiceManager is handed-off to
// BrowserMain() which may elect to promote it (e.g. to BrowserThread::IO). // BrowserMain() which may elect to promote it (e.g. to BrowserThread::IO).
if (process_type.empty()) { if (process_type.empty()) {
startup_data_ = std::make_unique<StartupDataImpl>();
startup_data_->thread = BrowserProcessSubThread::CreateIOThread();
main_params.startup_data = startup_data_.get();
if (GetContentClient()->browser()->ShouldCreateTaskScheduler()) { if (GetContentClient()->browser()->ShouldCreateTaskScheduler()) {
// Create the TaskScheduler early to allow upcoming code to use // Create the TaskScheduler early to allow upcoming code to use
// the post_task.h API. Note: This is okay because RunBrowserProcessMain() // the post_task.h API. Note: This is okay because RunBrowserProcessMain()
...@@ -944,8 +944,7 @@ int ContentMainRunnerImpl::Run() { ...@@ -944,8 +944,7 @@ int ContentMainRunnerImpl::Run() {
if (!base::MessageLoopCurrentForUI::IsSet()) if (!base::MessageLoopCurrentForUI::IsSet())
main_message_loop_ = std::make_unique<base::MessageLoopForUI>(); main_message_loop_ = std::make_unique<base::MessageLoopForUI>();
return RunBrowserProcessMain(main_params, delegate_, return RunBrowserProcessMain(main_params, delegate_);
std::move(service_manager_thread_));
} }
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD) #endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
...@@ -980,14 +979,6 @@ void ContentMainRunnerImpl::Shutdown() { ...@@ -980,14 +979,6 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true; is_shutdown_ = true;
} }
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
scoped_refptr<base::SingleThreadTaskRunner>
ContentMainRunnerImpl::GetServiceManagerTaskRunnerForEmbedderProcess() {
service_manager_thread_ = BrowserProcessSubThread::CreateIOThread();
return service_manager_thread_->task_runner();
}
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
// static // static
ContentMainRunner* ContentMainRunner::Create() { ContentMainRunner* ContentMainRunner::Create() {
return ContentMainRunnerImpl::Create(); return ContentMainRunnerImpl::Create();
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "content/browser/startup_data_impl.h"
#include "content/public/app/content_main.h" #include "content/public/app/content_main.h"
#include "content/public/app/content_main_runner.h" #include "content/public/app/content_main_runner.h"
#include "content/public/common/content_client.h" #include "content/public/common/content_client.h"
...@@ -23,11 +24,9 @@ ...@@ -23,11 +24,9 @@
namespace base { namespace base {
class AtExitManager; class AtExitManager;
class SingleThreadTaskRunner;
} // namespace base } // namespace base
namespace content { namespace content {
class BrowserProcessSubThread;
class ContentMainDelegate; class ContentMainDelegate;
struct ContentMainParams; struct ContentMainParams;
...@@ -45,13 +44,6 @@ class ContentMainRunnerImpl : public ContentMainRunner { ...@@ -45,13 +44,6 @@ class ContentMainRunnerImpl : public ContentMainRunner {
int Run() override; int Run() override;
void Shutdown() override; void Shutdown() override;
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
// Creates a thread and returns the SingleThreadTaskRunner on which
// ServiceManager should run.
scoped_refptr<base::SingleThreadTaskRunner>
GetServiceManagerTaskRunnerForEmbedderProcess();
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
private: private:
// True if the runner has been initialized. // True if the runner has been initialized.
bool is_initialized_ = false; bool is_initialized_ = false;
...@@ -76,14 +68,14 @@ class ContentMainRunnerImpl : public ContentMainRunner { ...@@ -76,14 +68,14 @@ class ContentMainRunnerImpl : public ContentMainRunner {
base::mac::ScopedNSAutoreleasePool* autorelease_pool_ = nullptr; base::mac::ScopedNSAutoreleasePool* autorelease_pool_ = nullptr;
#endif #endif
std::unique_ptr<BrowserProcessSubThread> service_manager_thread_;
base::Closure* ui_task_ = nullptr; base::Closure* ui_task_ = nullptr;
CreatedMainPartsClosure* created_main_parts_closure_ = nullptr; CreatedMainPartsClosure* created_main_parts_closure_ = nullptr;
std::unique_ptr<base::MessageLoop> main_message_loop_; std::unique_ptr<base::MessageLoop> main_message_loop_;
std::unique_ptr<StartupDataImpl> startup_data_;
DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
}; };
......
...@@ -126,11 +126,4 @@ ContentServiceManagerMainDelegate::CreateEmbeddedService( ...@@ -126,11 +126,4 @@ ContentServiceManagerMainDelegate::CreateEmbeddedService(
return nullptr; return nullptr;
} }
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
scoped_refptr<base::SingleThreadTaskRunner> ContentServiceManagerMainDelegate::
GetServiceManagerTaskRunnerForEmbedderProcess() {
return content_main_runner_->GetServiceManagerTaskRunnerForEmbedderProcess();
}
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
} // namespace content } // namespace content
...@@ -25,10 +25,6 @@ class ContentServiceManagerMainDelegate : public service_manager::MainDelegate { ...@@ -25,10 +25,6 @@ class ContentServiceManagerMainDelegate : public service_manager::MainDelegate {
// service_manager::MainDelegate: // service_manager::MainDelegate:
int Initialize(const InitializeParams& params) override; int Initialize(const InitializeParams& params) override;
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
scoped_refptr<base::SingleThreadTaskRunner>
GetServiceManagerTaskRunnerForEmbedderProcess() override;
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
bool IsEmbedderSubprocess() override; bool IsEmbedderSubprocess() override;
int RunEmbedderProcess() override; int RunEmbedderProcess() override;
void ShutDownEmbedderProcess() override; void ShutDownEmbedderProcess() override;
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "content/browser/browser_main_runner_impl.h" #include "content/browser/browser_main_runner_impl.h"
#include "content/browser/browser_process_sub_thread.h"
#include "content/common/content_constants_internal.h" #include "content/common/content_constants_internal.h"
namespace content { namespace content {
...@@ -31,9 +30,7 @@ class ScopedBrowserMainEvent { ...@@ -31,9 +30,7 @@ class ScopedBrowserMainEvent {
} // namespace } // namespace
// Main routine for running as the Browser process. // Main routine for running as the Browser process.
int BrowserMain( int BrowserMain(const MainFunctionParams& parameters) {
const MainFunctionParams& parameters,
std::unique_ptr<BrowserProcessSubThread> service_manager_thread) {
ScopedBrowserMainEvent scoped_browser_main_event; ScopedBrowserMainEvent scoped_browser_main_event;
base::trace_event::TraceLog::GetInstance()->set_process_name("Browser"); base::trace_event::TraceLog::GetInstance()->set_process_name("Browser");
...@@ -43,8 +40,7 @@ int BrowserMain( ...@@ -43,8 +40,7 @@ int BrowserMain(
std::unique_ptr<BrowserMainRunnerImpl> main_runner( std::unique_ptr<BrowserMainRunnerImpl> main_runner(
BrowserMainRunnerImpl::Create()); BrowserMainRunnerImpl::Create());
int exit_code = int exit_code = main_runner->Initialize(parameters);
main_runner->Initialize(parameters, std::move(service_manager_thread));
if (exit_code >= 0) if (exit_code >= 0)
return exit_code; return exit_code;
......
...@@ -11,12 +11,9 @@ ...@@ -11,12 +11,9 @@
namespace content { namespace content {
class BrowserProcessSubThread;
struct MainFunctionParams; struct MainFunctionParams;
CONTENT_EXPORT int BrowserMain( CONTENT_EXPORT int BrowserMain(const content::MainFunctionParams& parameters);
const content::MainFunctionParams& parameters,
std::unique_ptr<BrowserProcessSubThread> service_manager_thread);
} // namespace content } // namespace content
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
#include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/service_manager/service_manager_context.h" #include "content/browser/service_manager/service_manager_context.h"
#include "content/browser/speech/speech_recognition_manager_impl.h" #include "content/browser/speech/speech_recognition_manager_impl.h"
#include "content/browser/startup_data_impl.h"
#include "content/browser/startup_task_runner.h" #include "content/browser/startup_task_runner.h"
#include "content/browser/tracing/background_tracing_manager_impl.h" #include "content/browser/tracing/background_tracing_manager_impl.h"
#include "content/browser/tracing/tracing_controller_impl.h" #include "content/browser/tracing/tracing_controller_impl.h"
...@@ -557,13 +558,20 @@ BrowserMainLoop::~BrowserMainLoop() { ...@@ -557,13 +558,20 @@ BrowserMainLoop::~BrowserMainLoop() {
g_current_browser_main_loop = nullptr; g_current_browser_main_loop = nullptr;
} }
void BrowserMainLoop::Init( void BrowserMainLoop::Init() {
std::unique_ptr<BrowserProcessSubThread> service_manager_thread) {
TRACE_EVENT0("startup", "BrowserMainLoop::Init"); TRACE_EVENT0("startup", "BrowserMainLoop::Init");
// This is always invoked before |io_thread_| is initialized (i.e. never // |startup_data| is optional. If set, the thread owned by the data
// resets it). // will be registered as BrowserThread::IO in CreateThreads() instead of
io_thread_ = std::move(service_manager_thread); // creating a brand new thread.
if (parameters_.startup_data) {
StartupDataImpl* startup_data =
static_cast<StartupDataImpl*>(parameters_.startup_data);
// This is always invoked before |io_thread_| is initialized (i.e. never
// resets it).
io_thread_ = std::move(startup_data->thread);
}
parts_.reset( parts_.reset(
GetContentClient()->browser()->CreateBrowserMainParts(parameters_)); GetContentClient()->browser()->CreateBrowserMainParts(parameters_));
} }
......
...@@ -127,10 +127,7 @@ class CONTENT_EXPORT BrowserMainLoop { ...@@ -127,10 +127,7 @@ class CONTENT_EXPORT BrowserMainLoop {
explicit BrowserMainLoop(const MainFunctionParams& parameters); explicit BrowserMainLoop(const MainFunctionParams& parameters);
virtual ~BrowserMainLoop(); virtual ~BrowserMainLoop();
// |service_manager_thread| is optional. If set, it will be registered as void Init();
// BrowserThread::IO in CreateThreads() instead of creating a brand new
// thread.
void Init(std::unique_ptr<BrowserProcessSubThread> service_manager_thread);
// Return value is exit status. Anything other than RESULT_CODE_NORMAL_EXIT // Return value is exit status. Anything other than RESULT_CODE_NORMAL_EXIT
// is considered an error. // is considered an error.
......
...@@ -29,7 +29,7 @@ TEST(BrowserMainLoopTest, CreateThreadsInSingleProcess) { ...@@ -29,7 +29,7 @@ TEST(BrowserMainLoopTest, CreateThreadsInSingleProcess) {
*scoped_command_line.GetProcessCommandLine()); *scoped_command_line.GetProcessCommandLine());
BrowserMainLoop browser_main_loop(main_function_params); BrowserMainLoop browser_main_loop(main_function_params);
browser_main_loop.MainMessageLoopStart(); browser_main_loop.MainMessageLoopStart();
browser_main_loop.Init(nullptr); browser_main_loop.Init();
browser_main_loop.CreateThreads(); browser_main_loop.CreateThreads();
EXPECT_GE(base::TaskScheduler::GetInstance() EXPECT_GE(base::TaskScheduler::GetInstance()
->GetMaxConcurrentNonBlockedTasksWithTraitsDeprecated( ->GetMaxConcurrentNonBlockedTasksWithTraitsDeprecated(
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "components/tracing/common/trace_startup_config.h" #include "components/tracing/common/trace_startup_config.h"
#include "components/tracing/common/tracing_switches.h" #include "components/tracing/common/tracing_switches.h"
#include "content/browser/browser_main_loop.h" #include "content/browser/browser_main_loop.h"
#include "content/browser/browser_process_sub_thread.h"
#include "content/browser/browser_shutdown_profile_dumper.h" #include "content/browser/browser_shutdown_profile_dumper.h"
#include "content/browser/notification_service_impl.h" #include "content/browser/notification_service_impl.h"
#include "content/common/content_switches_internal.h" #include "content/common/content_switches_internal.h"
...@@ -63,12 +62,6 @@ BrowserMainRunnerImpl::~BrowserMainRunnerImpl() { ...@@ -63,12 +62,6 @@ BrowserMainRunnerImpl::~BrowserMainRunnerImpl() {
} }
int BrowserMainRunnerImpl::Initialize(const MainFunctionParams& parameters) { int BrowserMainRunnerImpl::Initialize(const MainFunctionParams& parameters) {
return Initialize(parameters, nullptr);
}
int BrowserMainRunnerImpl::Initialize(
const MainFunctionParams& parameters,
std::unique_ptr<BrowserProcessSubThread> service_manager_thread) {
SCOPED_UMA_HISTOGRAM_LONG_TIMER( SCOPED_UMA_HISTOGRAM_LONG_TIMER(
"Startup.BrowserMainRunnerImplInitializeLongTime"); "Startup.BrowserMainRunnerImplInitializeLongTime");
TRACE_EVENT0("startup", "BrowserMainRunnerImpl::Initialize"); TRACE_EVENT0("startup", "BrowserMainRunnerImpl::Initialize");
...@@ -117,7 +110,7 @@ int BrowserMainRunnerImpl::Initialize( ...@@ -117,7 +110,7 @@ int BrowserMainRunnerImpl::Initialize(
main_loop_.reset(new BrowserMainLoop(parameters)); main_loop_.reset(new BrowserMainLoop(parameters));
main_loop_->Init(std::move(service_manager_thread)); main_loop_->Init();
if (parameters.created_main_parts_closure) { if (parameters.created_main_parts_closure) {
parameters.created_main_parts_closure->Run(main_loop_->parts()); parameters.created_main_parts_closure->Run(main_loop_->parts());
......
...@@ -19,7 +19,6 @@ class ScopedOleInitializer; ...@@ -19,7 +19,6 @@ class ScopedOleInitializer;
namespace content { namespace content {
class BrowserProcessSubThread;
class BrowserMainLoop; class BrowserMainLoop;
class NotificationServiceImpl; class NotificationServiceImpl;
...@@ -38,12 +37,6 @@ class BrowserMainRunnerImpl : public BrowserMainRunner { ...@@ -38,12 +37,6 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
int Run() override; int Run() override;
void Shutdown() override; void Shutdown() override;
// Initialize all necessary browser state with a |service_manager_thread|
// on which ServiceManager is currently running.
int Initialize(
const MainFunctionParams& parameters,
std::unique_ptr<BrowserProcessSubThread> service_manager_thread);
private: private:
// True if we have started to initialize the runner. // True if we have started to initialize the runner.
bool initialization_started_; bool initialization_started_;
......
...@@ -28,6 +28,7 @@ class ScopedNSAutoreleasePool; ...@@ -28,6 +28,7 @@ class ScopedNSAutoreleasePool;
namespace content { namespace content {
class BrowserMainParts; class BrowserMainParts;
struct StartupData;
using CreatedMainPartsClosure = base::Callback<void(BrowserMainParts*)>; using CreatedMainPartsClosure = base::Callback<void(BrowserMainParts*)>;
...@@ -56,6 +57,10 @@ struct MainFunctionParams { ...@@ -56,6 +57,10 @@ struct MainFunctionParams {
// Used by InProcessBrowserTest. If non-null this is Run() after // Used by InProcessBrowserTest. If non-null this is Run() after
// BrowserMainParts has been created and before PreEarlyInitialization(). // BrowserMainParts has been created and before PreEarlyInitialization().
CreatedMainPartsClosure* created_main_parts_closure = nullptr; CreatedMainPartsClosure* created_main_parts_closure = nullptr;
// Used by //content, when the embedder yields control back to it, to extract
// startup data passed from ContentMainRunner.
StartupData* startup_data = nullptr;
}; };
} // namespace content } // namespace content
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "base/test/test_timeouts.h" #include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "content/browser/browser_process_sub_thread.h"
#include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/tracing/tracing_controller_impl.h" #include "content/browser/tracing/tracing_controller_impl.h"
#include "content/public/app/content_main.h" #include "content/public/app/content_main.h"
...@@ -124,8 +123,7 @@ class InitialNavigationObserver : public WebContentsObserver { ...@@ -124,8 +123,7 @@ class InitialNavigationObserver : public WebContentsObserver {
} // namespace } // namespace
extern int BrowserMain(const MainFunctionParams&, extern int BrowserMain(const MainFunctionParams&);
std::unique_ptr<BrowserProcessSubThread> io_thread);
BrowserTestBase::BrowserTestBase() BrowserTestBase::BrowserTestBase()
: field_trial_list_(std::make_unique<base::FieldTrialList>(nullptr)), : field_trial_list_(std::make_unique<base::FieldTrialList>(nullptr)),
...@@ -324,7 +322,7 @@ void BrowserTestBase::SetUp() { ...@@ -324,7 +322,7 @@ void BrowserTestBase::SetUp() {
params.created_main_parts_closure = created_main_parts_closure.release(); params.created_main_parts_closure = created_main_parts_closure.release();
base::TaskScheduler::Create("Browser"); base::TaskScheduler::Create("Browser");
// TODO(phajdan.jr): Check return code, http://crbug.com/374738 . // TODO(phajdan.jr): Check return code, http://crbug.com/374738 .
BrowserMain(params, nullptr); BrowserMain(params);
#else #else
GetContentMainParams()->ui_task = ui_task.release(); GetContentMainParams()->ui_task = ui_task.release();
GetContentMainParams()->created_main_parts_closure = GetContentMainParams()->created_main_parts_closure =
......
...@@ -449,13 +449,6 @@ int Main(const MainParams& params) { ...@@ -449,13 +449,6 @@ int Main(const MainParams& params) {
case ProcessType::kEmbedder: case ProcessType::kEmbedder:
if (delegate->IsEmbedderSubprocess()) if (delegate->IsEmbedderSubprocess())
CommonSubprocessInit(); CommonSubprocessInit();
if (command_line.GetSwitchValueASCII(switches::kProcessType).empty()) {
// TODO(https://crbug.com/729596): Use this task runner to start
// ServiceManager.
scoped_refptr<base::SingleThreadTaskRunner> task_runner =
delegate->GetServiceManagerTaskRunnerForEmbedderProcess();
}
exit_code = delegate->RunEmbedderProcess(); exit_code = delegate->RunEmbedderProcess();
break; break;
} }
......
...@@ -10,14 +10,6 @@ MainDelegate::MainDelegate() = default; ...@@ -10,14 +10,6 @@ MainDelegate::MainDelegate() = default;
MainDelegate::~MainDelegate() = default; MainDelegate::~MainDelegate() = default;
scoped_refptr<base::SingleThreadTaskRunner>
MainDelegate::GetServiceManagerTaskRunnerForEmbedderProcess() {
// The default implementation is provided for compiling purpose on Windows and
// should never be called.
NOTREACHED();
return nullptr;
}
bool MainDelegate::IsEmbedderSubprocess() { bool MainDelegate::IsEmbedderSubprocess() {
return false; return false;
} }
......
...@@ -49,11 +49,6 @@ class SERVICE_MANAGER_EMBEDDER_EXPORT MainDelegate { ...@@ -49,11 +49,6 @@ class SERVICE_MANAGER_EMBEDDER_EXPORT MainDelegate {
// failure. // failure.
virtual int Initialize(const InitializeParams& params) = 0; virtual int Initialize(const InitializeParams& params) = 0;
// Creates an thread and returns the SingleThreadTaskRunner on which
// ServiceManager should run.
virtual scoped_refptr<base::SingleThreadTaskRunner>
GetServiceManagerTaskRunnerForEmbedderProcess();
// Indicates whether this (embedder) process should be treated as a subprocess // Indicates whether this (embedder) process should be treated as a subprocess
// for the sake of some platform-specific environment initialization details. // for the sake of some platform-specific environment initialization details.
virtual bool IsEmbedderSubprocess(); virtual bool IsEmbedderSubprocess();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment