diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-19 18:23:25 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-19 18:23:25 +0000 |
commit | 1933eb200c4bb16e4df535d779c98561f85c1e25 (patch) | |
tree | 0ec1fe2dc176b2159abf8e33c53eaf940fb310c4 /chrome/browser/browser_main.cc | |
parent | fd599eeeddf2a57a2b2d70e63725106ce93c4591 (diff) | |
download | chromium_src-1933eb200c4bb16e4df535d779c98561f85c1e25.zip chromium_src-1933eb200c4bb16e4df535d779c98561f85c1e25.tar.gz chromium_src-1933eb200c4bb16e4df535d779c98561f85c1e25.tar.bz2 |
Clean up dns prefetch code, and also port it.
- remove slave threads and use HostResolver in asynchronous mode instead (while still limiting number of concurrent lookups)
- make the implementation portable and make DnsMaster unit test compile and pass on Linux
- add more tests to DnsMaster unit test to simulate various shutdown scenarios, concurrent lookups, and to verify that we don't exceed our limit of concurrent lookup requests)
- remove some tests which relied on specifics of slaves' inner working
- adjust initialization and shutdown of dns prefetching (now it relies on the IO message loop being present)
Bonus: shutdown is almost instant now, no need to have a timeout.
BUG=5687, 6683
Review URL: http://codereview.chromium.org/15076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index caaa963..c68d4a6 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -30,6 +30,7 @@ #include "chrome/browser/dom_ui/chrome_url_data_manager.h" #include "chrome/browser/first_run.h" #include "chrome/browser/metrics/metrics_service.h" +#include "chrome/browser/net/dns_global.h" #include "chrome/browser/profile_manager.h" #include "chrome/browser/shell_integration.h" #include "chrome/common/chrome_constants.h" @@ -108,7 +109,7 @@ void WillTerminate(); #if defined(OS_WIN) || defined(OS_LINUX) // Perform any platform-specific work that needs to be done before the main -// message loop is created and initialized. +// message loop is created and initialized. void WillInitializeMainMessageLoop(const CommandLine & command_line) { } @@ -442,12 +443,14 @@ int BrowserMain(const MainFunctionParams& parameters) { #if defined(OS_WIN) // Initialize Winsock. net::EnsureWinsockInit(); +#endif // defined(OS_WIN) // Initialize the DNS prefetch system chrome_browser_net::DnsPrefetcherInit dns_prefetch_init(user_prefs); chrome_browser_net::DnsPrefetchHostNamesAtStartup(user_prefs, local_state); chrome_browser_net::RestoreSubresourceReferrers(local_state); +#if defined(OS_WIN) // Init common control sex. INITCOMMONCONTROLSEX config; config.dwSize = sizeof(config); |