| 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/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // requirement for gconf. | 504 // requirement for gconf. |
| 505 g_type_init(); | 505 g_type_init(); |
| 506 #endif // !GLIB_CHECK_VERSION(2, 35, 0) | 506 #endif // !GLIB_CHECK_VERSION(2, 35, 0) |
| 507 | 507 |
| 508 SetUpGLibLogHandler(); | 508 SetUpGLibLogHandler(); |
| 509 #endif // defined(USE_GLIB) | 509 #endif // defined(USE_GLIB) |
| 510 | 510 |
| 511 if (parts_) | 511 if (parts_) |
| 512 parts_->PreEarlyInitialization(); | 512 parts_->PreEarlyInitialization(); |
| 513 | 513 |
| 514 #if defined(OS_MACOSX) | 514 #if defined(OS_MACOSX) || defined(OS_LINUX) |
| 515 // We use quite a few file descriptors for our IPC, and the default limit on | 515 // We use quite a few file descriptors for our IPC as well as disk the disk |
| 516 // the Mac is low (256), so bump it up. | 516 // cache,and the default limit on the Mac is low (256), so bump it up. |
| 517 base::SetFdLimit(1024); | 517 |
| 518 #elif defined(OS_LINUX) | |
| 519 // Same for Linux. The default various per distro, but it is 1024 on Fedora. | 518 // Same for Linux. The default various per distro, but it is 1024 on Fedora. |
| 520 // Low soft limits combined with liberal use of file descriptors means power | 519 // Low soft limits combined with liberal use of file descriptors means power |
| 521 // users can easily hit this limit with many open tabs. Bump up the limit to | 520 // users can easily hit this limit with many open tabs. Bump up the limit to |
| 522 // an arbitrarily high number. See https://crbug.com/539567 | 521 // an arbitrarily high number. See https://crbug.com/539567 |
| 523 base::SetFdLimit(8192); | 522 base::SetFdLimit(8192); |
| 524 #endif // default(OS_MACOSX) | 523 #endif // defined(OS_MACOSX) || defined(OS_LINUX) |
| 525 | 524 |
| 526 #if defined(OS_WIN) | 525 #if defined(OS_WIN) |
| 527 net::EnsureWinsockInit(); | 526 net::EnsureWinsockInit(); |
| 528 #endif | 527 #endif |
| 529 | 528 |
| 530 #if defined(USE_NSS_CERTS) | 529 #if defined(USE_NSS_CERTS) |
| 531 // We want to be sure to init NSPR on the main thread. | 530 // We want to be sure to init NSPR on the main thread. |
| 532 crypto::EnsureNSPRInit(); | 531 crypto::EnsureNSPRInit(); |
| 533 #endif | 532 #endif |
| 534 | 533 |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1568 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1570 audio_thread_->task_runner(); | 1569 audio_thread_->task_runner(); |
| 1571 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1570 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1572 std::move(worker_task_runner), | 1571 std::move(worker_task_runner), |
| 1573 MediaInternals::GetInstance()); | 1572 MediaInternals::GetInstance()); |
| 1574 } | 1573 } |
| 1575 CHECK(audio_manager_); | 1574 CHECK(audio_manager_); |
| 1576 } | 1575 } |
| 1577 | 1576 |
| 1578 } // namespace content | 1577 } // namespace content |
| OLD | NEW |