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 <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 #include "content/browser/plugin_service_impl.h" | 168 #include "content/browser/plugin_service_impl.h" |
169 #endif | 169 #endif |
170 | 170 |
171 #if defined(USE_X11) | 171 #if defined(USE_X11) |
172 #include "ui/base/x/x11_util_internal.h" | 172 #include "ui/base/x/x11_util_internal.h" |
173 #include "ui/gfx/x/x11_connection.h" | 173 #include "ui/gfx/x/x11_connection.h" |
174 #include "ui/gfx/x/x11_switches.h" | 174 #include "ui/gfx/x/x11_switches.h" |
175 #include "ui/gfx/x/x11_types.h" | 175 #include "ui/gfx/x/x11_types.h" |
176 #endif | 176 #endif |
177 | 177 |
178 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) | 178 #if defined(USE_NSS_CERTS) |
179 #include "crypto/nss_util.h" | 179 #include "crypto/nss_util.h" |
180 #endif | 180 #endif |
181 | 181 |
182 #if defined(MOJO_SHELL_CLIENT) | 182 #if defined(MOJO_SHELL_CLIENT) |
183 #include "services/shell/public/cpp/connector.h" | 183 #include "services/shell/public/cpp/connector.h" |
184 #include "ui/views/mus/window_manager_connection.h" | 184 #include "ui/views/mus/window_manager_connection.h" |
185 #endif | 185 #endif |
186 | 186 |
187 // One of the linux specific headers defines this as a macro. | 187 // One of the linux specific headers defines this as a macro. |
188 #ifdef DestroyAll | 188 #ifdef DestroyAll |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // Low soft limits combined with liberal use of file descriptors means power | 487 // Low soft limits combined with liberal use of file descriptors means power |
488 // users can easily hit this limit with many open tabs. Bump up the limit to | 488 // users can easily hit this limit with many open tabs. Bump up the limit to |
489 // an arbitrarily high number. See https://crbug.com/539567 | 489 // an arbitrarily high number. See https://crbug.com/539567 |
490 base::SetFdLimit(8192); | 490 base::SetFdLimit(8192); |
491 #endif // default(OS_MACOSX) | 491 #endif // default(OS_MACOSX) |
492 | 492 |
493 #if defined(OS_WIN) | 493 #if defined(OS_WIN) |
494 net::EnsureWinsockInit(); | 494 net::EnsureWinsockInit(); |
495 #endif | 495 #endif |
496 | 496 |
497 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) | 497 #if defined(USE_NSS_CERTS) |
498 // We want to be sure to init NSPR on the main thread. | 498 // We want to be sure to init NSPR on the main thread. |
499 crypto::EnsureNSPRInit(); | 499 crypto::EnsureNSPRInit(); |
500 #endif | 500 #endif |
501 | 501 |
502 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { | 502 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { |
503 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( | 503 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( |
504 switches::kRendererProcessLimit); | 504 switches::kRendererProcessLimit); |
505 size_t process_limit; | 505 size_t process_limit; |
506 if (base::StringToSizeT(limit_string, &process_limit)) { | 506 if (base::StringToSizeT(limit_string, &process_limit)) { |
507 RenderProcessHost::SetMaxRendererProcessCount(process_limit); | 507 RenderProcessHost::SetMaxRendererProcessCount(process_limit); |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 DCHECK(is_tracing_startup_for_duration_); | 1449 DCHECK(is_tracing_startup_for_duration_); |
1450 | 1450 |
1451 is_tracing_startup_for_duration_ = false; | 1451 is_tracing_startup_for_duration_ = false; |
1452 TracingController::GetInstance()->StopTracing( | 1452 TracingController::GetInstance()->StopTracing( |
1453 TracingController::CreateFileSink( | 1453 TracingController::CreateFileSink( |
1454 startup_trace_file_, | 1454 startup_trace_file_, |
1455 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1455 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1456 } | 1456 } |
1457 | 1457 |
1458 } // namespace content | 1458 } // namespace content |
OLD | NEW |