OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/browser_main_posix.h" | 5 #include "chrome/browser/browser_main_posix.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <limits.h> | 8 #include <limits.h> |
9 #include <signal.h> | 9 #include <signal.h> |
10 #include <sys/resource.h> | 10 #include <sys/resource.h> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 } else { | 180 } else { |
181 PLOG(INFO) << "Failed to get file descriptor limit"; | 181 PLOG(INFO) << "Failed to get file descriptor limit"; |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 } // namespace | 185 } // namespace |
186 | 186 |
187 // BrowserMainPartsPosix ------------------------------------------------------- | 187 // BrowserMainPartsPosix ------------------------------------------------------- |
188 | 188 |
| 189 BrowserMainPartsPosix::BrowserMainPartsPosix( |
| 190 const MainFunctionParams& parameters) |
| 191 : ChromeBrowserMainParts(parameters) { |
| 192 } |
| 193 |
189 void BrowserMainPartsPosix::PreEarlyInitialization() { | 194 void BrowserMainPartsPosix::PreEarlyInitialization() { |
190 // We need to accept SIGCHLD, even though our handler is a no-op because | 195 // We need to accept SIGCHLD, even though our handler is a no-op because |
191 // otherwise we cannot wait on children. (According to POSIX 2001.) | 196 // otherwise we cannot wait on children. (According to POSIX 2001.) |
192 struct sigaction action; | 197 struct sigaction action; |
193 memset(&action, 0, sizeof(action)); | 198 memset(&action, 0, sizeof(action)); |
194 action.sa_handler = SIGCHLDHandler; | 199 action.sa_handler = SIGCHLDHandler; |
195 CHECK(sigaction(SIGCHLD, &action, NULL) == 0); | 200 CHECK(sigaction(SIGCHLD, &action, NULL) == 0); |
196 | 201 |
197 // If adding to this list of signal handlers, note the new signal probably | 202 // If adding to this list of signal handlers, note the new signal probably |
198 // needs to be reset in child processes. See | 203 // needs to be reset in child processes. See |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 new ShutdownDetector(g_shutdown_pipe_read_fd))) { | 261 new ShutdownDetector(g_shutdown_pipe_read_fd))) { |
257 LOG(DFATAL) << "Failed to create shutdown detector task."; | 262 LOG(DFATAL) << "Failed to create shutdown detector task."; |
258 } | 263 } |
259 } | 264 } |
260 | 265 |
261 #if defined(TOOLKIT_USES_GTK) && !defined(OS_CHROMEOS) | 266 #if defined(TOOLKIT_USES_GTK) && !defined(OS_CHROMEOS) |
262 printing::PrintingContextCairo::SetCreatePrintDialogFunction( | 267 printing::PrintingContextCairo::SetCreatePrintDialogFunction( |
263 &PrintDialogGtk::CreatePrintDialog); | 268 &PrintDialogGtk::CreatePrintDialog); |
264 #endif | 269 #endif |
265 } | 270 } |
OLD | NEW |