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 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 | 1697 |
1698 // Initialize and maintain network predictor module, which handles DNS | 1698 // Initialize and maintain network predictor module, which handles DNS |
1699 // pre-resolution, as well as TCP/IP connection pre-warming. | 1699 // pre-resolution, as well as TCP/IP connection pre-warming. |
1700 // This also registers an observer to discard data when closing incognito | 1700 // This also registers an observer to discard data when closing incognito |
1701 // mode. | 1701 // mode. |
1702 bool preconnect_enabled = true; // Default status (easy to change!). | 1702 bool preconnect_enabled = true; // Default status (easy to change!). |
1703 if (parsed_command_line.HasSwitch(switches::kDisablePreconnect)) | 1703 if (parsed_command_line.HasSwitch(switches::kDisablePreconnect)) |
1704 preconnect_enabled = false; | 1704 preconnect_enabled = false; |
1705 else if (parsed_command_line.HasSwitch(switches::kEnablePreconnect)) | 1705 else if (parsed_command_line.HasSwitch(switches::kEnablePreconnect)) |
1706 preconnect_enabled = true; | 1706 preconnect_enabled = true; |
| 1707 // This will init a predictor using the most recently used profile if multi- |
| 1708 // profile is enabled. |
1707 chrome_browser_net::PredictorInit dns_prefetch( | 1709 chrome_browser_net::PredictorInit dns_prefetch( |
1708 user_prefs, | 1710 user_prefs, |
1709 local_state, | 1711 local_state, |
| 1712 profile, |
1710 preconnect_enabled); | 1713 preconnect_enabled); |
1711 | 1714 |
1712 #if defined(OS_WIN) | 1715 #if defined(OS_WIN) |
1713 app::win::ScopedCOMInitializer com_initializer; | 1716 app::win::ScopedCOMInitializer com_initializer; |
1714 | 1717 |
1715 #if defined(GOOGLE_CHROME_BUILD) | 1718 #if defined(GOOGLE_CHROME_BUILD) |
1716 // Init the RLZ library. This just binds the dll and schedules a task on the | 1719 // Init the RLZ library. This just binds the dll and schedules a task on the |
1717 // file thread to be run sometime later. If this is the first run we record | 1720 // file thread to be run sometime later. If this is the first run we record |
1718 // the installation event. | 1721 // the installation event. |
1719 bool google_search_default = false; | 1722 bool google_search_default = false; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 #if defined(OS_CHROMEOS) | 2001 #if defined(OS_CHROMEOS) |
1999 // To be precise, logout (browser shutdown) is not yet done, but the | 2002 // To be precise, logout (browser shutdown) is not yet done, but the |
2000 // remaining work is negligible, hence we say LogoutDone here. | 2003 // remaining work is negligible, hence we say LogoutDone here. |
2001 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2004 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
2002 false); | 2005 false); |
2003 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2006 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
2004 #endif | 2007 #endif |
2005 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2008 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
2006 return result_code; | 2009 return result_code; |
2007 } | 2010 } |
OLD | NEW |