OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/zygote_host/zygote_host_impl_linux.h" | 5 #include "content/browser/zygote_host/zygote_host_impl_linux.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <sys/socket.h> | 8 #include <sys/socket.h> |
9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 have_read_sandbox_status_word_(false), | 92 have_read_sandbox_status_word_(false), |
93 sandbox_status_(0), | 93 sandbox_status_(0), |
94 child_tracking_lock_(), | 94 child_tracking_lock_(), |
95 list_of_running_zygote_children_(), | 95 list_of_running_zygote_children_(), |
96 should_teardown_after_last_child_exits_(false) {} | 96 should_teardown_after_last_child_exits_(false) {} |
97 | 97 |
98 ZygoteHostImpl::~ZygoteHostImpl() { TearDown(); } | 98 ZygoteHostImpl::~ZygoteHostImpl() { TearDown(); } |
99 | 99 |
100 // static | 100 // static |
101 ZygoteHostImpl* ZygoteHostImpl::GetInstance() { | 101 ZygoteHostImpl* ZygoteHostImpl::GetInstance() { |
102 return Singleton<ZygoteHostImpl>::get(); | 102 return base::Singleton<ZygoteHostImpl>::get(); |
103 } | 103 } |
104 | 104 |
105 void ZygoteHostImpl::Init(const std::string& sandbox_cmd) { | 105 void ZygoteHostImpl::Init(const std::string& sandbox_cmd) { |
106 DCHECK(!init_); | 106 DCHECK(!init_); |
107 init_ = true; | 107 init_ = true; |
108 | 108 |
109 base::FilePath chrome_path; | 109 base::FilePath chrome_path; |
110 CHECK(PathService::Get(base::FILE_EXE, &chrome_path)); | 110 CHECK(PathService::Get(base::FILE_EXE, &chrome_path)); |
111 base::CommandLine cmd_line(chrome_path); | 111 base::CommandLine cmd_line(chrome_path); |
112 | 112 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 } | 593 } |
594 | 594 |
595 if (!sandbox::Credentials::CanCreateProcessInNewUserNS()) { | 595 if (!sandbox::Credentials::CanCreateProcessInNewUserNS()) { |
596 return false; | 596 return false; |
597 } | 597 } |
598 | 598 |
599 return true; | 599 return true; |
600 } | 600 } |
601 | 601 |
602 } // namespace content | 602 } // namespace content |
OLD | NEW |