0

Delete //services/service_manager/embedder

This eliminates the remaining target in the embedder directory by
merging its only interesting definition back into
content/public/common.

All references to the directory are removed here, including some stray
DEPS.

Bug: 977637
Change-Id: I43f77e0c9122289c82e9c24e851714cbeb3c6e38
Tbr: boliu@chromium.org
Tbr: thestig@chromium.org
Tbr: yucliu@chromium.org
Tbr: lazyboy@chromium.org
Tbr: kvitekp@chromium.org
Tbr: mbarbella@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441727
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812697}
This commit is contained in:
Ken Rockot
2020-10-01 15:10:05 +00:00
committed by Commit Bot
parent 73ff9e7a8f
commit 1d00d6d03c
47 changed files with 51 additions and 137 deletions

@ -82,7 +82,7 @@ int AwBrowserMainParts::PreEarlyInitialization() {
browser_process_ = std::make_unique<AwBrowserProcess>(
browser_client_->aw_feature_list_creator());
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
int AwBrowserMainParts::PreCreateThreads() {
@ -118,7 +118,7 @@ int AwBrowserMainParts::PreCreateThreads() {
crash_reporter::InitializeCrashKeys();
variations::InitCrashKeys();
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
void AwBrowserMainParts::PreMainMessageLoopRun() {

@ -2225,7 +2225,6 @@ static_library("browser") {
"//services/proxy_resolver/public/mojom",
"//services/resource_coordinator/public/cpp:resource_coordinator_cpp",
"//services/resource_coordinator/public/cpp/memory_instrumentation:browser",
"//services/service_manager/embedder:embedder_result_codes",
"//services/service_manager/public/cpp",
"//services/shape_detection/public/mojom",
"//services/strings",

@ -491,7 +491,7 @@ ChromeBrowserMainParts::ChromeBrowserMainParts(
StartupData* startup_data)
: parameters_(parameters),
parsed_command_line_(parameters.command_line),
result_code_(service_manager::RESULT_CODE_NORMAL_EXIT),
result_code_(content::RESULT_CODE_NORMAL_EXIT),
should_call_pre_main_loop_start_startup_on_variations_service_(
!parameters.ui_task),
profile_(nullptr),
@ -687,7 +687,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
}
// Continue on and show error later (once UI has been initialized and main
// message loop is running).
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
return load_local_state_result;
}
@ -748,7 +748,7 @@ int ChromeBrowserMainParts::PreCreateThreads() {
TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreads");
result_code_ = PreCreateThreadsImpl();
if (result_code_ == service_manager::RESULT_CODE_NORMAL_EXIT) {
if (result_code_ == content::RESULT_CODE_NORMAL_EXIT) {
// These members must be initialized before exiting this function normally.
#if !defined(OS_ANDROID)
DCHECK(browser_creator_.get());
@ -797,7 +797,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->SetApplicationLocale(locale);
const int apply_first_run_result = ApplyFirstRunPrefs();
if (apply_first_run_result != service_manager::RESULT_CODE_NORMAL_EXIT)
if (apply_first_run_result != content::RESULT_CODE_NORMAL_EXIT)
return apply_first_run_result;
SetupOriginTrialsCommandLine(browser_process_->local_state());
@ -805,7 +805,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
metrics::EnableExpiryChecker(chrome_metrics::kExpiredHistogramsHashes,
chrome_metrics::kNumExpiredHistograms);
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@ -817,7 +817,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs)
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
// On first run, we need to process the predictor preferences before the
// browser's profile_manager object is created, but after ResourceBundle
@ -843,7 +843,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
}
#endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@ -999,7 +999,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
// which is used in SetupMetrics().
SetupMetrics();
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
void ChromeBrowserMainParts::PostCreateThreads() {
@ -1197,7 +1197,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
return shell_integration::SetAsDefaultBrowser()
? static_cast<int>(service_manager::RESULT_CODE_NORMAL_EXIT)
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED);
}
@ -1213,7 +1213,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
if (parsed_command_line().HasSwitch(switches::kPackExtension)) {
extensions::StartupHelper extension_startup_helper;
if (extension_startup_helper.PackExtension(parsed_command_line()))
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
return chrome::RESULT_CODE_PACK_EXTENSION_ERROR;
}
@ -1244,7 +1244,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// expected.
if (parsed_command_line().HasSwitch(switches::kTestType))
return chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED;
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
case ProcessSingleton::PROFILE_IN_USE:
return chrome::RESULT_CODE_PROFILE_IN_USE;
@ -1336,7 +1336,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#else
// We don't support retention experiments on Mac or Linux.
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
#endif // defined(OS_WIN)
}
#endif // !defined(OS_ANDROID)
@ -1344,7 +1344,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
#if defined(OS_WIN)
// Do the tasks if chrome has been upgraded while it was last running.
if (!already_running && upgrade_util::DoUpgradeTasks(parsed_command_line()))
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
// Check if there is any machine level Chrome installed on the current
// machine. If yes and the current Chrome process is user level, we do not
@ -1365,7 +1365,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
user_data_dir_,
parsed_command_line());
if (!profile_)
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (first_run::IsChromeFirstRun()) {
@ -1445,7 +1445,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// The first run dialog is modal, and spins a RunLoop, which could receive
// a SIGTERM, and call chrome::AttemptExit(). Exit cleanly in that case.
if (browser_shutdown::IsTryingToQuit())
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
#endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)

@ -140,7 +140,7 @@ ChromeBrowserMainPartsPosix::ChromeBrowserMainPartsPosix(
int ChromeBrowserMainPartsPosix::PreEarlyInitialization() {
const int result = ChromeBrowserMainParts::PreEarlyInitialization();
if (result != service_manager::RESULT_CODE_NORMAL_EXIT)
if (result != content::RESULT_CODE_NORMAL_EXIT)
return result;
// We need to accept SIGCHLD, even though our handler is a no-op because
@ -150,7 +150,7 @@ int ChromeBrowserMainPartsPosix::PreEarlyInitialization() {
action.sa_handler = SIGCHLDHandler;
CHECK_EQ(0, sigaction(SIGCHLD, &action, NULL));
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
void ChromeBrowserMainPartsPosix::PostMainMessageLoopStart() {

@ -789,7 +789,7 @@ int ChromeBrowserMainPartsWin::HandleIconsCommands(
ShellExecute(NULL, NULL, L"appwiz.cpl", NULL, NULL, SW_SHOWNORMAL);
// Exit as we are not launching the browser.
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
// We don't hide icons so we shouldn't do anything special to show them
return chrome::RESULT_CODE_UNSUPPORTED_PARAM;

@ -31,7 +31,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "services/service_manager/embedder/result_codes.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

@ -42,7 +42,6 @@
#include "components/variations/service/variations_service.h"
#include "components/variations/variations_crash_keys.h"
#include "content/public/common/content_switch_dependent_feature_overrides.h"
#include "services/service_manager/embedder/result_codes.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_CHROMEOS)

@ -8,7 +8,7 @@
namespace chrome {
// Asks user for uninstall confirmation and returns one of these values:
// service_manager::RESULT_CODE_NORMAL_EXIT,
// content::RESULT_CODE_NORMAL_EXIT,
// chrome::RESULT_CODE_UNINSTALL_DELETE_PROFILE or
// chrome::RESULT_CODE_UNINSTALL_USER_CANCEL.
int ShowUninstallBrowserPrompt();

@ -136,7 +136,7 @@ void UninstallView::SetupControls() {
}
void UninstallView::OnDialogAccepted() {
user_selection_ = service_manager::RESULT_CODE_NORMAL_EXIT;
user_selection_ = content::RESULT_CODE_NORMAL_EXIT;
if (delete_profile_->GetChecked())
user_selection_ = chrome::RESULT_CODE_UNINSTALL_DELETE_PROFILE;
if (change_default_browser_ && change_default_browser_->GetChecked()) {
@ -177,7 +177,7 @@ namespace chrome {
int ShowUninstallBrowserPrompt() {
DCHECK(base::CurrentUIThread::IsSet());
int result = service_manager::RESULT_CODE_NORMAL_EXIT;
int result = content::RESULT_CODE_NORMAL_EXIT;
base::RunLoop run_loop;
UninstallView* view = new UninstallView(&result,

@ -7,7 +7,6 @@
#include "base/bind_helpers.h"
#include "chrome/common/chrome_result_codes.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "services/service_manager/embedder/result_codes.h"
#include "testing/gtest/include/gtest/gtest.h"
using UninstallViewTest = ChromeViewsTestBase;
@ -16,7 +15,7 @@ TEST_F(UninstallViewTest, Accept) {
int result = -1;
UninstallView view(&result, base::DoNothing());
view.Accept();
EXPECT_EQ(result, service_manager::RESULT_CODE_NORMAL_EXIT);
EXPECT_EQ(result, content::RESULT_CODE_NORMAL_EXIT);
}
TEST_F(UninstallViewTest, Cancel) {

@ -365,7 +365,7 @@ DeleteResult DeleteChromeFilesAndFolders(const InstallerState& installer_state,
// box that Chrome pops up.
InstallStatus IsChromeActiveOrUserCancelled(
const InstallerState& installer_state) {
int32_t exit_code = service_manager::RESULT_CODE_NORMAL_EXIT;
int32_t exit_code = content::RESULT_CODE_NORMAL_EXIT;
base::CommandLine options(base::CommandLine::NO_PROGRAM);
options.AppendSwitch(installer::switches::kUninstall);

@ -232,7 +232,7 @@ ServiceUtilityProcessHost::ServiceUtilityProcessHost(
ServiceUtilityProcessHost::~ServiceUtilityProcessHost() {
// We need to kill the child process when the host dies.
process_.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false);
process_.Terminate(content::RESULT_CODE_NORMAL_EXIT, false);
}
bool ServiceUtilityProcessHost::StartRenderPDFPagesToMetafile(

@ -2,5 +2,4 @@ include_rules = [
"+chromecast/android",
"+chromecast/browser/android",
"+jni",
"+services/service_manager/embedder",
]

@ -58,7 +58,6 @@ include_rules = [
"+services/media_session/public",
"+services/network/public/cpp",
"+services/service_manager/public",
"+services/service_manager/embedder",
"+storage/browser/quota/quota_settings.h",
"+third_party/blink/public/common",
"+third_party/blink/public/mojom/autoplay",

@ -41,7 +41,6 @@ include_rules = [
"+printing",
"+sandbox",
"+services/proxy_resolver/public/mojom",
"+services/service_manager/embedder",
"+services/service_manager/zygote",
"+skia",

@ -11,6 +11,5 @@ include_rules = [
"+gin/v8_initializer.h",
"+services/network/public/cpp/features.h",
"+services/resource_coordinator/public",
"+services/service_manager/embedder",
"+services/tracing/public/cpp",
]

@ -187,7 +187,6 @@ source_set("browser") {
"//services/resource_coordinator:lib",
"//services/resource_coordinator/public/cpp:resource_coordinator_cpp",
"//services/service_manager",
"//services/service_manager/embedder:embedder_result_codes",
"//services/service_manager/public/cpp",
"//services/service_manager/public/mojom",
"//services/shape_detection:lib",

@ -511,7 +511,7 @@ BrowserMainLoop::BrowserMainLoop(
scoped_execution_fence)
: parameters_(parameters),
parsed_command_line_(parameters.command_line),
result_code_(service_manager::RESULT_CODE_NORMAL_EXIT),
result_code_(RESULT_CODE_NORMAL_EXIT),
created_threads_(false),
scoped_execution_fence_(std::move(scoped_execution_fence))
#if !defined(OS_ANDROID)
@ -605,7 +605,7 @@ int BrowserMainLoop::EarlyInitialization() {
if (parts_) {
const int pre_early_init_error_code = parts_->PreEarlyInitialization();
if (pre_early_init_error_code != service_manager::RESULT_CODE_NORMAL_EXIT)
if (pre_early_init_error_code != RESULT_CODE_NORMAL_EXIT)
return pre_early_init_error_code;
}
@ -674,7 +674,7 @@ int BrowserMainLoop::EarlyInitialization() {
if (parts_)
parts_->PostEarlyInitialization();
return service_manager::RESULT_CODE_NORMAL_EXIT;
return RESULT_CODE_NORMAL_EXIT;
}
void BrowserMainLoop::PreMainMessageLoopStart() {

@ -17,7 +17,6 @@
#include "content/public/browser/child_process_launcher_utils.h"
#include "content/public/common/content_features.h"
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "services/service_manager/embedder/result_codes.h"
namespace content {

@ -10,7 +10,6 @@
#include "content/browser/child_process_launcher.h"
#include "content/public/browser/child_process_launcher_utils.h"
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "services/service_manager/embedder/result_codes.h"
namespace content {
namespace internal {
@ -119,7 +118,7 @@ void ChildProcessLauncherHelper::AfterLaunchOnLauncherThread(
void ChildProcessLauncherHelper::ForceNormalProcessTerminationSync(
ChildProcessLauncherHelper::Process process) {
DCHECK(CurrentlyOnProcessLauncherTaskRunner());
process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, true);
process.process.Terminate(RESULT_CODE_NORMAL_EXIT, true);
}
} // namespace internal

@ -139,7 +139,7 @@ bool ChildProcessLauncherHelper::TerminateProcess(const base::Process& process,
void ChildProcessLauncherHelper::ForceNormalProcessTerminationSync(
ChildProcessLauncherHelper::Process process) {
DCHECK(CurrentlyOnProcessLauncherTaskRunner());
process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false);
process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
// On POSIX, we must additionally reap the child.
if (process.zygote) {
// If the renderer was created via a zygote, we have to proxy the reaping

@ -26,7 +26,6 @@
#include "sandbox/policy/sandbox.h"
#include "sandbox/policy/sandbox_type.h"
#include "sandbox/policy/switches.h"
#include "services/service_manager/embedder/result_codes.h"
namespace content {
namespace internal {
@ -160,7 +159,7 @@ void ChildProcessLauncherHelper::ForceNormalProcessTerminationSync(
DCHECK(CurrentlyOnProcessLauncherTaskRunner());
// Client has gone away, so just kill the process. Using exit code 0 means
// that UMA won't treat this as a crash.
process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false);
process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
base::EnsureProcessTerminated(std::move(process.process));
}

@ -18,7 +18,6 @@
#include "mojo/public/cpp/platform/platform_channel.h"
#include "sandbox/policy/win/sandbox_win.h"
#include "sandbox/win/src/sandbox_types.h"
#include "services/service_manager/embedder/result_codes.h"
namespace content {
namespace internal {
@ -107,7 +106,7 @@ void ChildProcessLauncherHelper::ForceNormalProcessTerminationSync(
DCHECK(CurrentlyOnProcessLauncherTaskRunner());
// Client has gone away, so just kill the process. Using exit code 0 means
// that UMA won't treat this as a crash.
process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false);
process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
}
void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread(

@ -265,7 +265,6 @@ source_set("common") {
"//services/network/public/cpp",
"//services/network/public/mojom",
"//services/resource_coordinator/public/cpp/memory_instrumentation",
"//services/service_manager/embedder:embedder_result_codes",
"//services/service_manager/public/mojom",
"//services/video_capture/public/mojom",
"//services/viz/public/mojom",

@ -19,8 +19,8 @@
#include "base/stl_util.h"
#include "content/common/zygote/zygote_commands_linux.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "sandbox/policy/switches.h"
#include "services/service_manager/embedder/result_codes.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
namespace content {
@ -279,7 +279,7 @@ base::TerminationStatus ZygoteCommunication::GetTerminationStatus(
// Set this now to handle the error cases.
if (exit_code)
*exit_code = service_manager::RESULT_CODE_NORMAL_EXIT;
*exit_code = RESULT_CODE_NORMAL_EXIT;
int status = base::TERMINATION_STATUS_NORMAL_TERMINATION;
if (len == -1) {

@ -483,7 +483,6 @@ source_set("browser_sources") {
"//ppapi/c",
"//services/device/public/cpp/geolocation",
"//services/metrics/public/cpp:metrics_cpp",
"//services/service_manager/embedder:embedder_result_codes",
"//ui/accessibility",
"//ui/base",
"//ui/base/clipboard",

@ -4,12 +4,12 @@
#include "content/public/browser/browser_main_parts.h"
#include "services/service_manager/embedder/result_codes.h"
#include "content/public/common/result_codes.h"
namespace content {
int BrowserMainParts::PreEarlyInitialization() {
return service_manager::RESULT_CODE_NORMAL_EXIT;
return RESULT_CODE_NORMAL_EXIT;
}
int BrowserMainParts::PreCreateThreads() {

@ -27,7 +27,7 @@ struct CONTENT_EXPORT ChildProcessTerminationInfo {
// contain a platform specific launch failure error code. Otherwise, it will
// contain the exit code for the process (e.g. status from waitpid if on
// posix, from GetExitCodeProcess on Windows).
int exit_code = service_manager::RESULT_CODE_NORMAL_EXIT;
int exit_code = RESULT_CODE_NORMAL_EXIT;
// Populated only for renderer process. True if there are any visible
// clients at the time of process death.

@ -32,8 +32,6 @@ group("common") {
# header-only dependency, without bringing in all of content.
source_set("result_codes") {
sources = [ "result_codes.h" ]
deps = [ "//services/service_manager/embedder:embedder_result_codes" ]
}
# This target allows other targets to depend on content_descriptors.h which is
@ -226,7 +224,6 @@ source_set("common_sources") {
"//ppapi/buildflags",
"//ppapi/c",
"//services/network/public/cpp",
"//services/service_manager/embedder:embedder_result_codes",
"//services/service_manager/public/cpp",
"//skia",
"//storage/common",

@ -5,8 +5,6 @@
#ifndef CONTENT_PUBLIC_COMMON_RESULT_CODES_H_
#define CONTENT_PUBLIC_COMMON_RESULT_CODES_H_
#include "services/service_manager/embedder/result_codes.h"
namespace content {
// This file consolidates all the return codes for the browser and renderer
@ -30,10 +28,10 @@ namespace content {
// TODO(wfh): Break the dependency so it is possible to add more values.
enum ResultCode {
RESULT_CODE_CONTENT_START = service_manager::RESULT_CODE_LAST_CODE,
RESULT_CODE_NORMAL_EXIT,
// Process was killed by user or system.
RESULT_CODE_KILLED = RESULT_CODE_CONTENT_START,
RESULT_CODE_KILLED,
// Process hung.
RESULT_CODE_HUNG,

@ -235,7 +235,6 @@ static_library("content_shell_lib") {
"//net:net_resources",
"//ppapi/buildflags",
"//services/network/public/cpp",
"//services/service_manager/embedder:embedder_result_codes",
"//services/test/echo:lib",
"//services/test/echo/public/mojom",
"//third_party/blink/public:blink",

@ -40,9 +40,6 @@ include_rules = [
"+components/viz/common/switches.h",
"+services/test/echo",
# Access to the process specific switches.
"+services/service_manager/embedder",
# Separating content shell and web test code. Only narrow parts of content
# shell may access and inject web test code at runtime.
"-content/web_test/browser",

@ -23,6 +23,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
#include "content/shell/android/shell_descriptors.h"
#include "content/shell/browser/shell.h"
@ -34,7 +35,6 @@
#include "net/base/filename_util.h"
#include "net/base/net_module.h"
#include "net/grit/net_resources.h"
#include "services/service_manager/embedder/result_codes.h"
#include "ui/base/resource/resource_bundle.h"
#include "url/gurl.h"
@ -148,7 +148,7 @@ int ShellBrowserMainParts::PreEarlyInitialization() {
net::NetworkChangeNotifier::SetFactory(
new net::NetworkChangeNotifierFactoryAndroid());
#endif
return service_manager::RESULT_CODE_NORMAL_EXIT;
return RESULT_CODE_NORMAL_EXIT;
}
void ShellBrowserMainParts::InitializeBrowserContexts() {

@ -21,7 +21,6 @@ if (is_linux || is_chromeos) {
"//ipc",
"//sandbox",
"//sandbox/policy",
"//services/service_manager/embedder:embedder_result_codes",
"//third_party/icu",
]

@ -36,6 +36,7 @@
#include "content/common/zygote/zygote_commands_linux.h"
#include "content/public/common/content_descriptors.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/zygote/send_zygote_child_ping_linux.h"
#include "content/public/common/zygote/zygote_fork_delegate_linux.h"
#include "ipc/ipc_channel.h"
@ -43,7 +44,6 @@
#include "sandbox/linux/services/namespace_sandbox.h"
#include "sandbox/policy/linux/sandbox_linux.h"
#include "sandbox/policy/sandbox.h"
#include "services/service_manager/embedder/result_codes.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
// See
@ -128,7 +128,7 @@ bool Zygote::ProcessRequests() {
// right after the process starts and it may fail to send zygote magic
// number to browser process.
if (!r)
_exit(service_manager::RESULT_CODE_NORMAL_EXIT);
_exit(RESULT_CODE_NORMAL_EXIT);
#else
CHECK(r) << "Sending zygote magic failed";
#endif
@ -377,7 +377,7 @@ void Zygote::HandleGetTerminationStatus(int fd, base::PickleIterator iter) {
// it terminated normally.
NOTREACHED();
status = base::TERMINATION_STATUS_NORMAL_TERMINATION;
exit_code = service_manager::RESULT_CODE_NORMAL_EXIT;
exit_code = RESULT_CODE_NORMAL_EXIT;
}
base::Pickle write_pickle;

@ -8,7 +8,6 @@ include_rules = [
"+content/public/browser",
"+content/public/utility",
"+sandbox",
"+services/service_manager/embedder",
# Pieces of content_shell reused in app_shell.
# TODO(jamescook): Eliminate these. http://crbug.com/438283

@ -159,7 +159,7 @@ void ShellBrowserMainParts::PostMainMessageLoopStart() {
}
int ShellBrowserMainParts::PreEarlyInitialization() {
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
int ShellBrowserMainParts::PreCreateThreads() {
@ -260,7 +260,7 @@ bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
if (!run_message_loop_)
return true;
desktop_controller_->Run();
*result_code = service_manager::RESULT_CODE_NORMAL_EXIT;
*result_code = content::RESULT_CODE_NORMAL_EXIT;
return true;
}

@ -3,7 +3,6 @@ include_rules = [
"+content/shell/common",
"+content/shell/browser/shell_application_mac.h",
"+content/public/utility",
"+services/service_manager/embedder",
# Testing utilities can access anything in extensions/shell.
"+extensions/shell",

@ -26,7 +26,6 @@ include_rules = [
"+sandbox/policy",
"+sandbox/win/src",
"+services/network/public",
"+services/service_manager/embedder",
"+services/service_manager/public",
"+third_party/blink/public/common/web_preferences",
]

@ -1,9 +0,0 @@
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//testing/test.gni")
source_set("embedder_result_codes") {
sources = [ "result_codes.h" ]
}

@ -1,4 +0,0 @@
include_rules = [
"+components/tracing/common",
"+ui/base",
]

@ -1,17 +0,0 @@
# Service Manager Embedder API
The Service Manager is a library for opaquely managing service process launch,
sandboxing, and lifetime; and for brokering Mojo interface connections among
services.
The Service Manager must be configured with a static set of declarative service
definitions. The embedder API provides a means of embedding core Service Manager
functionality into a standalone executable, delegating configuration and
assorted implementation details to the embedder.
As one example, the Content layer of Chromium embeds the Service Manager via
this API, and there it's used [WIP] to drive all process management and IPC
setup across the system.
This API is a work in progress, and more details will be documented here as the
API is stabilized.

@ -1,26 +0,0 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_SERVICE_MANAGER_EMBEDDER_RESULT_CODES_H_
#define SERVICES_SERVICE_MANAGER_EMBEDDER_RESULT_CODES_H_
namespace service_manager {
// The return code returned by the main method.
// Extended by embedders.
enum ResultCode {
// Process terminated normally.
RESULT_CODE_NORMAL_EXIT,
// Last return code (keep this last).
RESULT_CODE_LAST_CODE
};
// Embedders may rely on these result codes not changing.
static_assert(RESULT_CODE_LAST_CODE == 1, "This enum is frozen.");
} // namespace service_manager
#endif // SERVICES_SERVICE_MANAGER_EMBEDDER_RESULT_CODES_H_

@ -4,5 +4,4 @@ include_rules = [
"+content/public/common",
"+mojo/core/embedder",
"+mojo/public",
"+services/service_manager/embedder",
]

@ -76632,7 +76632,7 @@ Called by update_scheduler_enums.py.-->
<int value="-529697949" label="EH_EXCEPTION_NUMBER"/>
<int value="-36863" label="0xFFFF7001 - Crashpad kCrashExitCodeNoDump."/>
<int value="-36862" label="0xFFFF7002 - Crashpad kFailedTerminationCode."/>
<int value="0" label="service_manager::RESULT_CODE_NORMAL_EXIT"/>
<int value="0" label="content::RESULT_CODE_NORMAL_EXIT"/>
<int value="1" label="content::RESULT_CODE_KILLED"/>
<int value="2" label="content::RESULT_CODE_HUNG"/>
<int value="3" label="content::RESULT_CODE_KILLED_BAD_MESSAGE"/>

@ -463,7 +463,6 @@ source_set("weblayer_lib_base") {
"//services/network/public/cpp",
"//services/network/public/mojom",
"//services/preferences/tracked",
"//services/service_manager/embedder:embedder_result_codes",
"//skia",
"//third_party/blink/public:blink_headers",
"//third_party/blink/public/common",

@ -20,8 +20,8 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/common/main_function_params.h"
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
#include "services/service_manager/embedder/result_codes.h"
#include "ui/base/resource/resource_bundle.h"
#include "weblayer/browser/browser_process.h"
#include "weblayer/browser/cookie_settings_factory.h"
@ -140,7 +140,7 @@ int BrowserMainPartsImpl::PreCreateThreads() {
}
#endif
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
void BrowserMainPartsImpl::PreMainMessageLoopStart() {
@ -171,7 +171,7 @@ int BrowserMainPartsImpl::PreEarlyInitialization() {
BrowserProcess::GetInstance()->GetSharedURLLoaderFactory());
download_manager->set_application_locale(i18n::GetApplicationLocale());
return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}
void BrowserMainPartsImpl::PreMainMessageLoopRun() {