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