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

Unified Diff: content/app/content_main_runner.cc

Issue 13845008: [Mac] Remove base::LaunchSynchronize and rewrite content::MachBroker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix link_settings Created 7 years, 8 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 | « base/process_util_posix.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 256f78f6dfe33d5245947ab629905d655ba56875..257f701fecf1fc17276b80e19340351ae59e9da2 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -180,32 +180,6 @@ base::LazyInstance<ContentUtilityClient>
static CAppModule _Module;
-#elif defined(OS_MACOSX) && !defined(OS_IOS)
-
-// Completes the Mach IPC handshake by sending this process' task port to the
-// parent process. The parent is listening on the Mach port given by
-// |GetMachPortName()|. The task port is used by the parent to get CPU/memory
-// stats to display in the task manager.
-void SendTaskPortToParentProcess() {
- const mach_msg_timeout_t kTimeoutMs = 100;
- const int32_t kMessageId = 0;
- std::string mach_port_name = MachBroker::GetMachPortName();
-
- base::MachSendMessage child_message(kMessageId);
- if (!child_message.AddDescriptor(mach_task_self())) {
- LOG(ERROR) << "child AddDescriptor(mach_task_self()) failed.";
- return;
- }
-
- base::MachPortSender child_sender(mach_port_name.c_str());
- kern_return_t err = child_sender.SendMessage(child_message, kTimeoutMs);
- if (err != KERN_SUCCESS) {
- LOG(ERROR) <<
- base::StringPrintf("child SendMessage() failed: 0x%x %s", err,
- mach_error_string(err));
- }
-}
-
#endif // defined(OS_WIN)
#if defined(OS_POSIX) && !defined(OS_IOS)
@@ -666,7 +640,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
if (!process_type.empty() &&
(!delegate || delegate->ShouldSendMachPort(process_type))) {
- SendTaskPortToParentProcess();
+ MachBroker::ChildSendTaskPortToParent();
}
#elif defined(OS_WIN)
// This must be done early enough since some helper functions like
« no previous file with comments | « base/process_util_posix.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698