Skip to content

Commit

Permalink
Delete //services/service_manager/embedder
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
krockot authored and Commit Bot committed Oct 1, 2020
1 parent 73ff9e7 commit 1d00d6d
Show file tree
Hide file tree
Showing 47 changed files with 51 additions and 137 deletions.
4 changes: 2 additions & 2 deletions android_webview/browser/aw_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
30 changes: 15 additions & 15 deletions chrome/browser/chrome_browser_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -797,15 +797,15 @@ 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());

metrics::EnableExpiryChecker(chrome_metrics::kExpiredHistogramsHashes,
chrome_metrics::kNumExpiredHistograms);

return service_manager::RESULT_CODE_NORMAL_EXIT;
return content::RESULT_CODE_NORMAL_EXIT;
}

int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
Expand All @@ -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
Expand All @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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);
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1336,15 +1336,15 @@ 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)

#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
Expand All @@ -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()) {
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/chrome_browser_main_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/chrome_browser_main_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/metrics/chrome_feature_list_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/uninstall_browser_prompt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/ui/views/uninstall_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/ui/views/uninstall_view_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/setup/uninstall.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion chrome/service/service_utility_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion chromecast/app/android/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ include_rules = [
"+chromecast/android",
"+chromecast/browser/android",
"+jni",
"+services/service_manager/embedder",
]
1 change: 0 additions & 1 deletion chromecast/browser/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion content/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ include_rules = [
"+printing",
"+sandbox",
"+services/proxy_resolver/public/mojom",
"+services/service_manager/embedder",
"+services/service_manager/zygote",
"+skia",

Expand Down
1 change: 0 additions & 1 deletion content/app/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
1 change: 0 additions & 1 deletion content/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions content/browser/browser_main_loop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion content/browser/child_process_launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
3 changes: 1 addition & 2 deletions content/browser/child_process_launcher_helper_fuchsia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion content/browser/child_process_launcher_helper_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions content/browser/child_process_launcher_helper_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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));
}

Expand Down
3 changes: 1 addition & 2 deletions content/browser/child_process_launcher_helper_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down
Loading

0 comments on commit 1d00d6d

Please sign in to comment.