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

Unified Diff: chrome/browser/child_process_launcher.cc

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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/browser/browser_signin.cc ('k') | chrome/browser/chromeos/dom_ui/imageburner_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/child_process_launcher.cc
diff --git a/chrome/browser/child_process_launcher.cc b/chrome/browser/child_process_launcher.cc
index f215084dc6ddc95ba7431294701a91ad5f98b580..2586826acf8125ac4d8f6e9ddb8b4778f688e818 100644
--- a/chrome/browser/child_process_launcher.cc
+++ b/chrome/browser/child_process_launcher.cc
@@ -115,12 +115,13 @@ class ChildProcessLauncher::Context
base::GlobalDescriptors::Mapping mapping;
mapping.push_back(std::pair<uint32_t, int>(kPrimaryIPCChannel, ipcfd));
const int crash_signal_fd =
- Singleton<RendererCrashHandlerHostLinux>()->GetDeathSignalSocket();
+ RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
if (crash_signal_fd >= 0) {
mapping.push_back(std::pair<uint32_t, int>(kCrashDumpSignal,
crash_signal_fd));
}
- handle = Singleton<ZygoteHost>()->ForkRenderer(cmd_line->argv(), mapping);
+ handle = ZygoteHost::GetInstance()->ForkRenderer(cmd_line->argv(),
+ mapping);
} else
// Fall through to the normal posix case below when we're not zygoting.
#endif
@@ -143,10 +144,10 @@ class ChildProcessLauncher::Context
if (is_renderer || is_plugin) {
int crash_signal_fd;
if (is_renderer) {
- crash_signal_fd = Singleton<RendererCrashHandlerHostLinux>()->
+ crash_signal_fd = RendererCrashHandlerHostLinux::GetInstance()->
GetDeathSignalSocket();
} else {
- crash_signal_fd = Singleton<PluginCrashHandlerHostLinux>()->
+ crash_signal_fd = PluginCrashHandlerHostLinux::GetInstance()->
GetDeathSignalSocket();
}
if (crash_signal_fd >= 0) {
@@ -157,7 +158,7 @@ class ChildProcessLauncher::Context
}
if (is_renderer) {
const int sandbox_fd =
- Singleton<RenderSandboxHostLinux>()->GetRendererSocket();
+ RenderSandboxHostLinux::GetInstance()->GetRendererSocket();
fds_to_map.push_back(std::make_pair(
sandbox_fd,
kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor));
@@ -253,7 +254,7 @@ class ChildProcessLauncher::Context
if (zygote) {
// If the renderer was created via a zygote, we have to proxy the reaping
// through the zygote process.
- Singleton<ZygoteHost>()->EnsureProcessTerminated(handle);
+ ZygoteHost::GetInstance()->EnsureProcessTerminated(handle);
} else
#endif // OS_LINUX
{
@@ -315,7 +316,8 @@ bool ChildProcessLauncher::DidProcessCrash() {
base::ProcessHandle handle = context_->process_.handle();
#if defined(OS_LINUX)
if (context_->zygote_) {
- did_crash = Singleton<ZygoteHost>()->DidProcessCrash(handle, &child_exited);
+ did_crash = ZygoteHost::GetInstance()->DidProcessCrash(handle,
+ &child_exited);
} else
#endif
{
« no previous file with comments | « chrome/browser/browser_signin.cc ('k') | chrome/browser/chromeos/dom_ui/imageburner_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698