| 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 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 new GpuBlacklistUpdater(); | 1836 new GpuBlacklistUpdater(); |
| 1836 // Don't start auto update in tests. | 1837 // Don't start auto update in tests. |
| 1837 if (parsed_command_line.GetSwitchValueASCII(switches::kUseGL) != | 1838 if (parsed_command_line.GetSwitchValueASCII(switches::kUseGL) != |
| 1838 gfx::kGLImplementationOSMesaName) { | 1839 gfx::kGLImplementationOSMesaName) { |
| 1839 gpu_blacklist_updater->StartAfterDelay(); | 1840 gpu_blacklist_updater->StartAfterDelay(); |
| 1840 } | 1841 } |
| 1841 | 1842 |
| 1842 // Start watching all browser threads for responsiveness. | 1843 // Start watching all browser threads for responsiveness. |
| 1843 ThreadWatcherList::StartWatchingAll(); | 1844 ThreadWatcherList::StartWatchingAll(); |
| 1844 | 1845 |
| 1846 // Enable WebSocket over SPDY. |
| 1847 if (parsed_command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) |
| 1848 net::WebSocketJob::EnableWebSocketOverSpdy(true); |
| 1849 |
| 1845 int result_code = ResultCodes::NORMAL_EXIT; | 1850 int result_code = ResultCodes::NORMAL_EXIT; |
| 1846 if (parameters.ui_task) { | 1851 if (parameters.ui_task) { |
| 1847 // We are in test mode. Run one task and enter the main message loop. | 1852 // We are in test mode. Run one task and enter the main message loop. |
| 1848 if (pool) | 1853 if (pool) |
| 1849 pool->Recycle(); | 1854 pool->Recycle(); |
| 1850 parameters.ui_task->Run(); | 1855 parameters.ui_task->Run(); |
| 1851 delete parameters.ui_task; | 1856 delete parameters.ui_task; |
| 1852 } else { | 1857 } else { |
| 1853 // Most general initialization is behind us, but opening a | 1858 // Most general initialization is behind us, but opening a |
| 1854 // tab and/or session restore and such is still to be done. | 1859 // tab and/or session restore and such is still to be done. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1949 #if defined(OS_CHROMEOS) | 1954 #if defined(OS_CHROMEOS) |
| 1950 // To be precise, logout (browser shutdown) is not yet done, but the | 1955 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1951 // remaining work is negligible, hence we say LogoutDone here. | 1956 // remaining work is negligible, hence we say LogoutDone here. |
| 1952 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1957 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1953 false); | 1958 false); |
| 1954 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1959 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 1955 #endif | 1960 #endif |
| 1956 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1961 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 1957 return result_code; | 1962 return result_code; |
| 1958 } | 1963 } |
| OLD | NEW |