| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #include "net/base/net_module.h" | 93 #include "net/base/net_module.h" |
| 94 #include "net/base/network_change_notifier.h" | 94 #include "net/base/network_change_notifier.h" |
| 95 #include "net/http/http_network_layer.h" | 95 #include "net/http/http_network_layer.h" |
| 96 #include "net/http/http_stream_factory.h" | 96 #include "net/http/http_stream_factory.h" |
| 97 #include "net/socket/client_socket_pool_base.h" | 97 #include "net/socket/client_socket_pool_base.h" |
| 98 #include "net/socket/client_socket_pool_manager.h" | 98 #include "net/socket/client_socket_pool_manager.h" |
| 99 #include "net/socket/tcp_client_socket.h" | 99 #include "net/socket/tcp_client_socket.h" |
| 100 #include "net/spdy/spdy_session.h" | 100 #include "net/spdy/spdy_session.h" |
| 101 #include "net/spdy/spdy_session_pool.h" | 101 #include "net/spdy/spdy_session_pool.h" |
| 102 #include "net/url_request/url_request.h" | 102 #include "net/url_request/url_request.h" |
| 103 #include "net/url_request/url_request_throttler_manager.h" |
| 103 | 104 |
| 104 #if defined(USE_LINUX_BREAKPAD) | 105 #if defined(USE_LINUX_BREAKPAD) |
| 105 #include "base/linux_util.h" | 106 #include "base/linux_util.h" |
| 106 #include "chrome/app/breakpad_linux.h" | 107 #include "chrome/app/breakpad_linux.h" |
| 107 #endif | 108 #endif |
| 108 | 109 |
| 109 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 110 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 110 #include <dbus/dbus-glib.h> | 111 #include <dbus/dbus-glib.h> |
| 111 #include "chrome/browser/browser_main_gtk.h" | 112 #include "chrome/browser/browser_main_gtk.h" |
| 112 #include "chrome/browser/gtk/gtk_util.h" | 113 #include "chrome/browser/gtk/gtk_util.h" |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); | 580 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); |
| 580 | 581 |
| 581 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { | 582 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { |
| 582 int value; | 583 int value; |
| 583 base::StringToInt(parsed_command_line.GetSwitchValueASCII( | 584 base::StringToInt(parsed_command_line.GetSwitchValueASCII( |
| 584 switches::kMaxSpdySessionsPerDomain), | 585 switches::kMaxSpdySessionsPerDomain), |
| 585 &value); | 586 &value); |
| 586 net::SpdySessionPool::set_max_sessions_per_domain(value); | 587 net::SpdySessionPool::set_max_sessions_per_domain(value); |
| 587 } | 588 } |
| 588 | 589 |
| 590 if (parsed_command_line.HasSwitch(switches::kDisableEnforcedThrottling)) { |
| 591 net::URLRequestThrottlerManager::GetInstance()-> |
| 592 set_enforce_throttling(false); |
| 593 } |
| 594 |
| 589 SetDnsCertProvenanceCheckerFactory(CreateChromeDnsCertProvenanceChecker); | 595 SetDnsCertProvenanceCheckerFactory(CreateChromeDnsCertProvenanceChecker); |
| 590 } | 596 } |
| 591 | 597 |
| 592 // Creates key child threads. We need to do this explicitly since | 598 // Creates key child threads. We need to do this explicitly since |
| 593 // BrowserThread::PostTask silently deletes a posted task if the target message | 599 // BrowserThread::PostTask silently deletes a posted task if the target message |
| 594 // loop isn't created. | 600 // loop isn't created. |
| 595 void CreateChildThreads(BrowserProcessImpl* process) { | 601 void CreateChildThreads(BrowserProcessImpl* process) { |
| 596 process->db_thread(); | 602 process->db_thread(); |
| 597 process->file_thread(); | 603 process->file_thread(); |
| 598 process->process_launcher_thread(); | 604 process->process_launcher_thread(); |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1729 #if defined(OS_CHROMEOS) | 1735 #if defined(OS_CHROMEOS) |
| 1730 // To be precise, logout (browser shutdown) is not yet done, but the | 1736 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1731 // remaining work is negligible, hence we say LogoutDone here. | 1737 // remaining work is negligible, hence we say LogoutDone here. |
| 1732 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1738 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1733 false); | 1739 false); |
| 1734 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1740 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 1735 #endif | 1741 #endif |
| 1736 TRACE_EVENT_END("BrowserMain", 0, 0); | 1742 TRACE_EVENT_END("BrowserMain", 0, 0); |
| 1737 return result_code; | 1743 return result_code; |
| 1738 } | 1744 } |
| OLD | NEW |