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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #include "content/common/result_codes.h" | 96 #include "content/common/result_codes.h" |
97 #include "grit/app_locale_settings.h" | 97 #include "grit/app_locale_settings.h" |
98 #include "grit/chromium_strings.h" | 98 #include "grit/chromium_strings.h" |
99 #include "grit/generated_resources.h" | 99 #include "grit/generated_resources.h" |
100 #include "grit/platform_locale_settings.h" | 100 #include "grit/platform_locale_settings.h" |
101 #include "net/base/cookie_monster.h" | 101 #include "net/base/cookie_monster.h" |
102 #include "net/base/net_module.h" | 102 #include "net/base/net_module.h" |
103 #include "net/base/network_change_notifier.h" | 103 #include "net/base/network_change_notifier.h" |
104 #include "net/http/http_network_layer.h" | 104 #include "net/http/http_network_layer.h" |
105 #include "net/http/http_stream_factory.h" | 105 #include "net/http/http_stream_factory.h" |
| 106 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" |
106 #include "net/socket/client_socket_pool_base.h" | 107 #include "net/socket/client_socket_pool_base.h" |
107 #include "net/socket/client_socket_pool_manager.h" | 108 #include "net/socket/client_socket_pool_manager.h" |
108 #include "net/socket/tcp_client_socket.h" | 109 #include "net/socket/tcp_client_socket.h" |
109 #include "net/spdy/spdy_session.h" | 110 #include "net/spdy/spdy_session.h" |
110 #include "net/spdy/spdy_session_pool.h" | 111 #include "net/spdy/spdy_session_pool.h" |
111 #include "net/url_request/url_request.h" | 112 #include "net/url_request/url_request.h" |
112 #include "net/url_request/url_request_throttler_manager.h" | 113 #include "net/url_request/url_request_throttler_manager.h" |
113 #include "ui/base/l10n/l10n_util.h" | 114 #include "ui/base/l10n/l10n_util.h" |
114 #include "ui/base/resource/resource_bundle.h" | 115 #include "ui/base/resource/resource_bundle.h" |
115 #include "ui/base/system_monitor/system_monitor.h" | 116 #include "ui/base/system_monitor/system_monitor.h" |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 net::CookieMonster::EnableFileScheme(); | 620 net::CookieMonster::EnableFileScheme(); |
620 } | 621 } |
621 | 622 |
622 if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors)) | 623 if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors)) |
623 net::HttpStreamFactory::set_ignore_certificate_errors(true); | 624 net::HttpStreamFactory::set_ignore_certificate_errors(true); |
624 | 625 |
625 if (parsed_command_line.HasSwitch(switches::kHostRules)) | 626 if (parsed_command_line.HasSwitch(switches::kHostRules)) |
626 net::HttpStreamFactory::SetHostMappingRules( | 627 net::HttpStreamFactory::SetHostMappingRules( |
627 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); | 628 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); |
628 | 629 |
| 630 if (parsed_command_line.HasSwitch(switches::kEnableDhcpWpad)) |
| 631 net::DhcpProxyScriptFetcherFactory::SetEnabled(true); |
| 632 |
629 if (parsed_command_line.HasSwitch(switches::kEnableIPPooling)) | 633 if (parsed_command_line.HasSwitch(switches::kEnableIPPooling)) |
630 net::SpdySessionPool::enable_ip_pooling(true); | 634 net::SpdySessionPool::enable_ip_pooling(true); |
631 | 635 |
632 if (parsed_command_line.HasSwitch(switches::kDisableIPPooling)) | 636 if (parsed_command_line.HasSwitch(switches::kDisableIPPooling)) |
633 net::SpdySessionPool::enable_ip_pooling(false); | 637 net::SpdySessionPool::enable_ip_pooling(false); |
634 | 638 |
635 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { | 639 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { |
636 int value; | 640 int value; |
637 base::StringToInt(parsed_command_line.GetSwitchValueASCII( | 641 base::StringToInt(parsed_command_line.GetSwitchValueASCII( |
638 switches::kMaxSpdySessionsPerDomain), | 642 switches::kMaxSpdySessionsPerDomain), |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1898 #if defined(OS_CHROMEOS) | 1902 #if defined(OS_CHROMEOS) |
1899 // To be precise, logout (browser shutdown) is not yet done, but the | 1903 // To be precise, logout (browser shutdown) is not yet done, but the |
1900 // remaining work is negligible, hence we say LogoutDone here. | 1904 // remaining work is negligible, hence we say LogoutDone here. |
1901 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1905 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1902 false); | 1906 false); |
1903 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1907 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1904 #endif | 1908 #endif |
1905 TRACE_EVENT_END("BrowserMain", 0, 0); | 1909 TRACE_EVENT_END("BrowserMain", 0, 0); |
1906 return result_code; | 1910 return result_code; |
1907 } | 1911 } |
OLD | NEW |