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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 #include "chrome/common/logging_chrome.h" | 83 #include "chrome/common/logging_chrome.h" |
84 #include "chrome/common/main_function_params.h" | 84 #include "chrome/common/main_function_params.h" |
85 #include "chrome/common/net/net_resource_provider.h" | 85 #include "chrome/common/net/net_resource_provider.h" |
86 #include "chrome/common/pref_names.h" | 86 #include "chrome/common/pref_names.h" |
87 #include "chrome/common/result_codes.h" | 87 #include "chrome/common/result_codes.h" |
88 #include "chrome/installer/util/google_update_settings.h" | 88 #include "chrome/installer/util/google_update_settings.h" |
89 #include "grit/app_locale_settings.h" | 89 #include "grit/app_locale_settings.h" |
90 #include "grit/chromium_strings.h" | 90 #include "grit/chromium_strings.h" |
91 #include "grit/generated_resources.h" | 91 #include "grit/generated_resources.h" |
92 #include "net/base/cookie_monster.h" | 92 #include "net/base/cookie_monster.h" |
| 93 #include "net/base/dns_reload_timer.h" |
93 #include "net/base/net_module.h" | 94 #include "net/base/net_module.h" |
94 #include "net/base/network_change_notifier.h" | 95 #include "net/base/network_change_notifier.h" |
95 #include "net/http/http_network_layer.h" | 96 #include "net/http/http_network_layer.h" |
96 #include "net/http/http_stream_factory.h" | 97 #include "net/http/http_stream_factory.h" |
97 #include "net/socket/client_socket_pool_base.h" | 98 #include "net/socket/client_socket_pool_base.h" |
98 #include "net/socket/client_socket_pool_manager.h" | 99 #include "net/socket/client_socket_pool_manager.h" |
99 #include "net/socket/tcp_client_socket.h" | 100 #include "net/socket/tcp_client_socket.h" |
100 #include "net/spdy/spdy_session.h" | 101 #include "net/spdy/spdy_session.h" |
101 #include "net/spdy/spdy_session_pool.h" | 102 #include "net/spdy/spdy_session_pool.h" |
102 #include "net/url_request/url_request.h" | 103 #include "net/url_request/url_request.h" |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 CreateChildThreads(browser_process.get()); | 1256 CreateChildThreads(browser_process.get()); |
1256 | 1257 |
1257 #if defined(OS_CHROMEOS) | 1258 #if defined(OS_CHROMEOS) |
1258 // Now that the file thread exists we can record our stats. | 1259 // Now that the file thread exists we can record our stats. |
1259 chromeos::BootTimesLoader::Get()->RecordChromeMainStats(); | 1260 chromeos::BootTimesLoader::Get()->RecordChromeMainStats(); |
1260 // Change the UI font if necessary. This has to be done after | 1261 // Change the UI font if necessary. This has to be done after |
1261 // InitSharedInstance() is called, as it depends on resource data. | 1262 // InitSharedInstance() is called, as it depends on resource data. |
1262 MaybeChangeUIFont(); | 1263 MaybeChangeUIFont(); |
1263 #endif | 1264 #endif |
1264 | 1265 |
| 1266 #if WATCH_RESOLV_CONF |
| 1267 net::InitResolvConfWatcher(browser_process->file_thread()); |
| 1268 #endif |
| 1269 |
1265 // Record last shutdown time into a histogram. | 1270 // Record last shutdown time into a histogram. |
1266 browser_shutdown::ReadLastShutdownInfo(); | 1271 browser_shutdown::ReadLastShutdownInfo(); |
1267 | 1272 |
1268 #if defined(OS_WIN) | 1273 #if defined(OS_WIN) |
1269 // On Windows, we use our startup as an opportunity to do upgrade/uninstall | 1274 // On Windows, we use our startup as an opportunity to do upgrade/uninstall |
1270 // tasks. Those care whether the browser is already running. On Linux/Mac, | 1275 // tasks. Those care whether the browser is already running. On Linux/Mac, |
1271 // upgrade/uninstall happen separately. | 1276 // upgrade/uninstall happen separately. |
1272 bool already_running = Upgrade::IsBrowserAlreadyRunning(); | 1277 bool already_running = Upgrade::IsBrowserAlreadyRunning(); |
1273 | 1278 |
1274 // If the command line specifies 'uninstall' then we need to work here | 1279 // If the command line specifies 'uninstall' then we need to work here |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 #if defined(OS_CHROMEOS) | 1740 #if defined(OS_CHROMEOS) |
1736 // To be precise, logout (browser shutdown) is not yet done, but the | 1741 // To be precise, logout (browser shutdown) is not yet done, but the |
1737 // remaining work is negligible, hence we say LogoutDone here. | 1742 // remaining work is negligible, hence we say LogoutDone here. |
1738 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1743 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1739 false); | 1744 false); |
1740 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1745 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1741 #endif | 1746 #endif |
1742 TRACE_EVENT_END("BrowserMain", 0, 0); | 1747 TRACE_EVENT_END("BrowserMain", 0, 0); |
1743 return result_code; | 1748 return result_code; |
1744 } | 1749 } |
OLD | NEW |