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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 net::CookieMonster::EnableFileScheme(); | 618 net::CookieMonster::EnableFileScheme(); |
618 } | 619 } |
619 | 620 |
620 if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors)) | 621 if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors)) |
621 net::HttpStreamFactory::set_ignore_certificate_errors(true); | 622 net::HttpStreamFactory::set_ignore_certificate_errors(true); |
622 | 623 |
623 if (parsed_command_line.HasSwitch(switches::kHostRules)) | 624 if (parsed_command_line.HasSwitch(switches::kHostRules)) |
624 net::HttpStreamFactory::SetHostMappingRules( | 625 net::HttpStreamFactory::SetHostMappingRules( |
625 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); | 626 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); |
626 | 627 |
| 628 if (parsed_command_line.HasSwitch(switches::kEnableDhcpPac)) |
| 629 net::DhcpProxyScriptFetcherFactory::GetInstance()->SetEnabled(true); |
| 630 |
627 if (parsed_command_line.HasSwitch(switches::kEnableIPPooling)) | 631 if (parsed_command_line.HasSwitch(switches::kEnableIPPooling)) |
628 net::SpdySessionPool::enable_ip_pooling(true); | 632 net::SpdySessionPool::enable_ip_pooling(true); |
629 | 633 |
630 if (parsed_command_line.HasSwitch(switches::kDisableIPPooling)) | 634 if (parsed_command_line.HasSwitch(switches::kDisableIPPooling)) |
631 net::SpdySessionPool::enable_ip_pooling(false); | 635 net::SpdySessionPool::enable_ip_pooling(false); |
632 | 636 |
633 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { | 637 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { |
634 int value; | 638 int value; |
635 base::StringToInt(parsed_command_line.GetSwitchValueASCII( | 639 base::StringToInt(parsed_command_line.GetSwitchValueASCII( |
636 switches::kMaxSpdySessionsPerDomain), | 640 switches::kMaxSpdySessionsPerDomain), |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1879 #if defined(OS_CHROMEOS) | 1883 #if defined(OS_CHROMEOS) |
1880 // To be precise, logout (browser shutdown) is not yet done, but the | 1884 // To be precise, logout (browser shutdown) is not yet done, but the |
1881 // remaining work is negligible, hence we say LogoutDone here. | 1885 // remaining work is negligible, hence we say LogoutDone here. |
1882 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1886 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1883 false); | 1887 false); |
1884 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1888 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1885 #endif | 1889 #endif |
1886 TRACE_EVENT_END("BrowserMain", 0, 0); | 1890 TRACE_EVENT_END("BrowserMain", 0, 0); |
1887 return result_code; | 1891 return result_code; |
1888 } | 1892 } |
OLD | NEW |