| 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.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #include "net/base/network_change_notifier.h" | 101 #include "net/base/network_change_notifier.h" |
| 102 #include "net/http/http_network_layer.h" | 102 #include "net/http/http_network_layer.h" |
| 103 #include "net/http/http_stream_factory.h" | 103 #include "net/http/http_stream_factory.h" |
| 104 #include "net/socket/client_socket_pool_base.h" | 104 #include "net/socket/client_socket_pool_base.h" |
| 105 #include "net/socket/client_socket_pool_manager.h" | 105 #include "net/socket/client_socket_pool_manager.h" |
| 106 #include "net/socket/tcp_client_socket.h" | 106 #include "net/socket/tcp_client_socket.h" |
| 107 #include "net/spdy/spdy_session.h" | 107 #include "net/spdy/spdy_session.h" |
| 108 #include "net/spdy/spdy_session_pool.h" | 108 #include "net/spdy/spdy_session_pool.h" |
| 109 #include "net/url_request/url_request.h" | 109 #include "net/url_request/url_request.h" |
| 110 #include "net/url_request/url_request_throttler_manager.h" | 110 #include "net/url_request/url_request_throttler_manager.h" |
| 111 #include "net/websockets/websocket_job.h" |
| 111 #include "ui/base/l10n/l10n_util.h" | 112 #include "ui/base/l10n/l10n_util.h" |
| 112 #include "ui/base/resource/resource_bundle.h" | 113 #include "ui/base/resource/resource_bundle.h" |
| 113 #include "ui/gfx/gl/gl_implementation.h" | 114 #include "ui/gfx/gl/gl_implementation.h" |
| 114 #include "ui/gfx/gl/gl_switches.h" | 115 #include "ui/gfx/gl/gl_switches.h" |
| 115 | 116 |
| 116 #if defined(USE_LINUX_BREAKPAD) | 117 #if defined(USE_LINUX_BREAKPAD) |
| 117 #include "base/linux_util.h" | 118 #include "base/linux_util.h" |
| 118 #include "chrome/app/breakpad_linux.h" | 119 #include "chrome/app/breakpad_linux.h" |
| 119 #endif | 120 #endif |
| 120 | 121 |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 base::StringToInt(parsed_command_line.GetSwitchValueASCII( | 719 base::StringToInt(parsed_command_line.GetSwitchValueASCII( |
| 719 switches::kMaxSpdySessionsPerDomain), | 720 switches::kMaxSpdySessionsPerDomain), |
| 720 &value); | 721 &value); |
| 721 net::SpdySessionPool::set_max_sessions_per_domain(value); | 722 net::SpdySessionPool::set_max_sessions_per_domain(value); |
| 722 } | 723 } |
| 723 | 724 |
| 724 net::URLRequestThrottlerManager::GetInstance()->set_enable_thread_checks( | 725 net::URLRequestThrottlerManager::GetInstance()->set_enable_thread_checks( |
| 725 true); | 726 true); |
| 726 | 727 |
| 727 SetDnsCertProvenanceCheckerFactory(CreateChromeDnsCertProvenanceChecker); | 728 SetDnsCertProvenanceCheckerFactory(CreateChromeDnsCertProvenanceChecker); |
| 729 |
| 730 if (parsed_command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) { |
| 731 // Enable WebSocket over SPDY. |
| 732 net::WebSocketJob::set_websocket_over_spdy_enabled(true); |
| 733 } |
| 728 } | 734 } |
| 729 | 735 |
| 730 // Creates key child threads. We need to do this explicitly since | 736 // Creates key child threads. We need to do this explicitly since |
| 731 // BrowserThread::PostTask silently deletes a posted task if the target message | 737 // BrowserThread::PostTask silently deletes a posted task if the target message |
| 732 // loop isn't created. | 738 // loop isn't created. |
| 733 void CreateChildThreads(BrowserProcessImpl* process) { | 739 void CreateChildThreads(BrowserProcessImpl* process) { |
| 734 process->db_thread(); | 740 process->db_thread(); |
| 735 process->file_thread(); | 741 process->file_thread(); |
| 736 process->process_launcher_thread(); | 742 process->process_launcher_thread(); |
| 737 process->cache_thread(); | 743 process->cache_thread(); |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1951 #if defined(OS_CHROMEOS) | 1957 #if defined(OS_CHROMEOS) |
| 1952 // To be precise, logout (browser shutdown) is not yet done, but the | 1958 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1953 // remaining work is negligible, hence we say LogoutDone here. | 1959 // remaining work is negligible, hence we say LogoutDone here. |
| 1954 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1960 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1955 false); | 1961 false); |
| 1956 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1962 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 1957 #endif | 1963 #endif |
| 1958 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1964 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 1959 return result_code; | 1965 return result_code; |
| 1960 } | 1966 } |
| OLD | NEW |