Commit 70abd171 authored by Mila Green's avatar Mila Green Committed by Commit Bot

Updater: Implement --single-process for Mac.

Bug: 1060800
Change-Id: I7e28e1e57458d26577cc06413e35db921cd583de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134566Reviewed-by: default avatarSorin Jianu <sorin@chromium.org>
Commit-Queue: Mila Green <milagreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755939}
parent fa474e4b
...@@ -4,14 +4,20 @@ ...@@ -4,14 +4,20 @@
#include "chrome/updater/update_apps.h" #include "chrome/updater/update_apps.h"
#include "base/command_line.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "chrome/updater/configurator.h" #include "chrome/updater/configurator.h"
#include "chrome/updater/constants.h"
#include "chrome/updater/mac/update_service_out_of_process.h" #include "chrome/updater/mac/update_service_out_of_process.h"
#include "chrome/updater/update_service_in_process.h"
namespace updater { namespace updater {
scoped_refptr<UpdateService> CreateUpdateService( scoped_refptr<UpdateService> CreateUpdateService(
scoped_refptr<update_client::Configurator> config) { scoped_refptr<update_client::Configurator> config) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessSwitch))
return base::MakeRefCounted<UpdateServiceInProcess>(config);
else
return base::MakeRefCounted<UpdateServiceOutOfProcess>(); return base::MakeRefCounted<UpdateServiceOutOfProcess>();
} }
......
...@@ -85,11 +85,6 @@ int HandleUpdaterCommands(const base::CommandLine* command_line) { ...@@ -85,11 +85,6 @@ int HandleUpdaterCommands(const base::CommandLine* command_line) {
CHECK(false) << "--crash-me was used."; CHECK(false) << "--crash-me was used.";
} }
#if defined(OS_MACOSX)
// TODO(crbug.com/1060800) Consider implementing --single-process on macOS.
CHECK(!command_line->HasSwitch(kSingleProcessSwitch));
#endif
if (command_line->HasSwitch(kServerSwitch)) { if (command_line->HasSwitch(kServerSwitch)) {
return AppServerInstance()->Run(); return AppServerInstance()->Run();
} }
......
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