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

Unified Diff: chrome/common/service_process_util_mac.mm

Issue 2444363003: Remove uses of ChannelHandle for service processes. (Closed)
Patch Set: Created 4 years, 2 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 | « chrome/common/service_process_util_linux.cc ('k') | chrome/common/service_process_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util_mac.mm
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index de0fdd3287276d339b0c720346ff7ac6353604f7..72987e3a8bf607d4b8d576390df8d215a27ae40f 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -101,10 +101,10 @@ base::FilePath GetServiceProcessSocketName() {
} // namespace
-IPC::ChannelHandle GetServiceProcessChannel() {
+mojo::edk::NamedPlatformHandle GetServiceProcessChannel() {
base::FilePath socket_name = GetServiceProcessSocketName();
VLOG(1) << "ServiceProcessChannel: " << socket_name.value();
- return IPC::ChannelHandle(socket_name.value());
+ return mojo::edk::NamedPlatformHandle(socket_name.value());
}
bool ForceServiceProcessShutdown(const std::string& /* version */,
@@ -182,7 +182,8 @@ bool ServiceProcessState::Initialize() {
return true;
}
-IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() {
+mojo::edk::ScopedPlatformHandle
+ServiceProcessState::GetServiceProcessChannel() {
DCHECK(state_);
NSDictionary* ns_launchd_conf = base::mac::CFToNSCast(state_->launchd_conf);
NSDictionary* socket_dict =
@@ -191,8 +192,7 @@ IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() {
[socket_dict objectForKey:GetServiceProcessLaunchDSocketKey()];
DCHECK_EQ([sockets count], 1U);
int socket = [[sockets objectAtIndex:0] intValue];
- base::FileDescriptor fd(socket, false);
- return IPC::ChannelHandle(std::string(), fd);
+ return mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle(socket));
}
bool CheckServiceProcessReady() {
« no previous file with comments | « chrome/common/service_process_util_linux.cc ('k') | chrome/common/service_process_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698