Index: content/browser/mach_broker_mac.mm |
diff --git a/content/browser/mach_broker_mac.mm b/content/browser/mach_broker_mac.mm |
index e4ee38e09b2f4cc7c5886f4e62c29c293ddee94a..1c9e6e55bd85674e7f83c45be7a13857fda5d9c2 100644 |
--- a/content/browser/mach_broker_mac.mm |
+++ b/content/browser/mach_broker_mac.mm |
@@ -132,6 +132,7 @@ class MachListenerThreadDelegate : public base::PlatformThread::Delegate { |
DISALLOW_COPY_AND_ASSIGN(MachListenerThreadDelegate); |
}; |
+// static |
bool MachBroker::ChildSendTaskPortToParent() { |
// Look up the named MachBroker port that's been registered with the |
// bootstrap server. |
@@ -167,6 +168,17 @@ bool MachBroker::ChildSendTaskPortToParent() { |
return true; |
} |
+// static |
+std::string MachBroker::GetMachPortName() { |
+ const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
+ const bool is_child = command_line->HasSwitch(switches::kProcessType); |
+ |
+ // In non-browser (child) processes, use the parent's pid. |
+ const pid_t pid = is_child ? getppid() : getpid(); |
+ return base::StringPrintf("%s.rohitfork.%d", base::mac::BaseBundleID(), pid); |
+} |
+ |
+// static |
MachBroker* MachBroker::GetInstance() { |
return Singleton<MachBroker, LeakySingletonTraits<MachBroker> >::get(); |
} |
@@ -274,16 +286,6 @@ void MachBroker::InvalidatePid(base::ProcessHandle pid) { |
mach_map_.erase(it); |
} |
-// static |
-std::string MachBroker::GetMachPortName() { |
- const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
- const bool is_child = command_line->HasSwitch(switches::kProcessType); |
- |
- // In non-browser (child) processes, use the parent's pid. |
- const pid_t pid = is_child ? getppid() : getpid(); |
- return base::StringPrintf("%s.rohitfork.%d", base::mac::BaseBundleID(), pid); |
-} |
- |
void MachBroker::RegisterNotifications() { |
registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_CLOSED, |
NotificationService::AllBrowserContextsAndSources()); |