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

Unified Diff: chrome/browser/zygote_host_linux.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/zygote_host_linux.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/zygote_host_linux.cc
diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc
index b6115f140fcabe807a9ed20dc3aa6bee5ce5a59d..74b68529700229315a599a02bf1c4135a44e506d 100644
--- a/chrome/browser/zygote_host_linux.cc
+++ b/chrome/browser/zygote_host_linux.cc
@@ -66,6 +66,11 @@ ZygoteHost::~ZygoteHost() {
close(control_fd_);
}
+// static
+ZygoteHost* ZygoteHost::GetInstance() {
+ return Singleton<ZygoteHost>::get();
+}
+
void ZygoteHost::Init(const std::string& sandbox_cmd) {
DCHECK(!init_);
init_ = true;
@@ -129,7 +134,7 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
// Start up the sandbox host process and get the file descriptor for the
// renderers to talk to it.
- const int sfd = Singleton<RenderSandboxHostLinux>()->GetRendererSocket();
+ const int sfd = RenderSandboxHostLinux::GetInstance()->GetRendererSocket();
fds_to_map.push_back(std::make_pair(sfd, 5));
int dummy_fd = -1;
« no previous file with comments | « chrome/browser/zygote_host_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698