| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.h" | 5 #include "chrome/browser/browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #include "grit/app_locale_settings.h" | 86 #include "grit/app_locale_settings.h" |
| 87 #include "grit/chromium_strings.h" | 87 #include "grit/chromium_strings.h" |
| 88 #include "grit/generated_resources.h" | 88 #include "grit/generated_resources.h" |
| 89 #include "net/base/cookie_monster.h" | 89 #include "net/base/cookie_monster.h" |
| 90 #include "net/base/net_module.h" | 90 #include "net/base/net_module.h" |
| 91 #include "net/base/network_change_notifier.h" | 91 #include "net/base/network_change_notifier.h" |
| 92 #include "net/http/http_network_layer.h" | 92 #include "net/http/http_network_layer.h" |
| 93 #include "net/http/http_stream_factory.h" | 93 #include "net/http/http_stream_factory.h" |
| 94 #include "net/socket/client_socket_pool_base.h" | 94 #include "net/socket/client_socket_pool_base.h" |
| 95 #include "net/socket/client_socket_pool_manager.h" | 95 #include "net/socket/client_socket_pool_manager.h" |
| 96 #include "net/socket/tcp_client_socket.h" |
| 96 #include "net/spdy/spdy_session_pool.h" | 97 #include "net/spdy/spdy_session_pool.h" |
| 97 | 98 |
| 98 #if defined(USE_LINUX_BREAKPAD) | 99 #if defined(USE_LINUX_BREAKPAD) |
| 99 #include "base/linux_util.h" | 100 #include "base/linux_util.h" |
| 100 #include "chrome/app/breakpad_linux.h" | 101 #include "chrome/app/breakpad_linux.h" |
| 101 #endif | 102 #endif |
| 102 | 103 |
| 103 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 104 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 104 #include "chrome/browser/browser_main_gtk.h" | 105 #include "chrome/browser/browser_main_gtk.h" |
| 105 #include "chrome/browser/gtk/gtk_util.h" | 106 #include "chrome/browser/gtk/gtk_util.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 189 |
| 189 if (parsed_command_line().HasSwitch(switches::kEnableDNSSECCerts)) | 190 if (parsed_command_line().HasSwitch(switches::kEnableDNSSECCerts)) |
| 190 net::SSLConfigService::EnableDNSSEC(); | 191 net::SSLConfigService::EnableDNSSEC(); |
| 191 if (parsed_command_line().HasSwitch(switches::kDisableSSLFalseStart)) | 192 if (parsed_command_line().HasSwitch(switches::kDisableSSLFalseStart)) |
| 192 net::SSLConfigService::DisableFalseStart(); | 193 net::SSLConfigService::DisableFalseStart(); |
| 193 if (parsed_command_line().HasSwitch(switches::kAllowSSLMITMProxies)) | 194 if (parsed_command_line().HasSwitch(switches::kAllowSSLMITMProxies)) |
| 194 net::SSLConfigService::AllowMITMProxies(); | 195 net::SSLConfigService::AllowMITMProxies(); |
| 195 if (parsed_command_line().HasSwitch(switches::kEnableSnapStart)) | 196 if (parsed_command_line().HasSwitch(switches::kEnableSnapStart)) |
| 196 net::SSLConfigService::EnableSnapStart(); | 197 net::SSLConfigService::EnableSnapStart(); |
| 197 | 198 |
| 199 if (parsed_command_line().HasSwitch(switches::kEnableTcpFastOpen)) |
| 200 net::set_tcp_fastopen_enabled(true); |
| 201 |
| 198 PostEarlyInitialization(); | 202 PostEarlyInitialization(); |
| 199 } | 203 } |
| 200 | 204 |
| 201 // This is an A/B test for the maximum number of persistent connections per | 205 // This is an A/B test for the maximum number of persistent connections per |
| 202 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari | 206 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari |
| 203 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to | 207 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to |
| 204 // run faster) uses 8. We would like to see how much of an effect this value has | 208 // run faster) uses 8. We would like to see how much of an effect this value has |
| 205 // on browsing. Too large a value might cause us to run into SYN flood detection | 209 // on browsing. Too large a value might cause us to run into SYN flood detection |
| 206 // mechanisms. | 210 // mechanisms. |
| 207 void BrowserMainParts::ConnectionFieldTrial() { | 211 void BrowserMainParts::ConnectionFieldTrial() { |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 metrics->Stop(); | 1553 metrics->Stop(); |
| 1550 | 1554 |
| 1551 // browser_shutdown takes care of deleting browser_process, so we need to | 1555 // browser_shutdown takes care of deleting browser_process, so we need to |
| 1552 // release it. | 1556 // release it. |
| 1553 ignore_result(browser_process.release()); | 1557 ignore_result(browser_process.release()); |
| 1554 browser_shutdown::Shutdown(); | 1558 browser_shutdown::Shutdown(); |
| 1555 | 1559 |
| 1556 TRACE_EVENT_END("BrowserMain", 0, 0); | 1560 TRACE_EVENT_END("BrowserMain", 0, 0); |
| 1557 return result_code; | 1561 return result_code; |
| 1558 } | 1562 } |
| OLD | NEW |