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_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "content/browser/debugger/browser_list_tabcontents_provider.h" | 70 #include "content/browser/debugger/browser_list_tabcontents_provider.h" |
71 #include "content/browser/debugger/devtools_http_protocol_handler.h" | 71 #include "content/browser/debugger/devtools_http_protocol_handler.h" |
72 #include "content/browser/debugger/devtools_manager.h" | 72 #include "content/browser/debugger/devtools_manager.h" |
73 #include "content/browser/debugger/devtools_protocol_handler.h" | 73 #include "content/browser/debugger/devtools_protocol_handler.h" |
74 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 74 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
75 #include "content/browser/plugin_service.h" | 75 #include "content/browser/plugin_service.h" |
76 #include "content/browser/renderer_host/render_process_host.h" | 76 #include "content/browser/renderer_host/render_process_host.h" |
77 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 77 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
78 #include "content/common/notification_service.h" | 78 #include "content/common/notification_service.h" |
79 #include "ipc/ipc_logging.h" | 79 #include "ipc/ipc_logging.h" |
| 80 #include "net/socket/client_socket_pool_manager.h" |
80 #include "net/url_request/url_request_context_getter.h" | 81 #include "net/url_request/url_request_context_getter.h" |
81 #include "ui/base/clipboard/clipboard.h" | 82 #include "ui/base/clipboard/clipboard.h" |
82 #include "ui/base/l10n/l10n_util.h" | 83 #include "ui/base/l10n/l10n_util.h" |
83 #include "webkit/plugins/npapi/plugin_list.h" | 84 #include "webkit/plugins/npapi/plugin_list.h" |
84 | 85 |
85 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
86 #include "views/focus/view_storage.h" | 87 #include "views/focus/view_storage.h" |
87 #endif | 88 #endif |
88 | 89 |
89 #if defined(IPC_MESSAGE_LOG_ENABLED) | 90 #if defined(IPC_MESSAGE_LOG_ENABLED) |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 // This preference is only needed on the IO thread so make it available there. | 843 // This preference is only needed on the IO thread so make it available there. |
843 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); | 844 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); |
844 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, | 845 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, |
845 local_state_.get(), NULL); | 846 local_state_.get(), NULL); |
846 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); | 847 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); |
847 | 848 |
848 // Initialize the disk cache location policy. This policy is not hot update- | 849 // Initialize the disk cache location policy. This policy is not hot update- |
849 // able so we need to have it when initializing the profiles. | 850 // able so we need to have it when initializing the profiles. |
850 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); | 851 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); |
851 | 852 |
| 853 // Another policy that needs to be defined before the net subsystem is |
| 854 // initialized is MaxConnectionsPerProxy so we do it here. |
| 855 local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
| 856 net::kDefaultMaxSocketsPerProxyServer); |
| 857 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); |
| 858 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( |
| 859 std::max(std::min(max_per_proxy, 99), |
| 860 net::ClientSocketPoolManager::max_sockets_per_group())); |
| 861 |
852 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 862 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
853 // though, so it can't register itself. | 863 // though, so it can't register itself. |
854 local_state_->RegisterListPref(prefs::kDisabledSchemes); | 864 local_state_->RegisterListPref(prefs::kDisabledSchemes); |
855 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); | 865 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); |
856 ApplyDisabledSchemesPolicy(); | 866 ApplyDisabledSchemesPolicy(); |
857 } | 867 } |
858 | 868 |
859 void BrowserProcessImpl::CreateIconManager() { | 869 void BrowserProcessImpl::CreateIconManager() { |
860 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 870 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
861 created_icon_manager_ = true; | 871 created_icon_manager_ = true; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 } | 1078 } |
1069 | 1079 |
1070 void BrowserProcessImpl::OnAutoupdateTimer() { | 1080 void BrowserProcessImpl::OnAutoupdateTimer() { |
1071 if (CanAutorestartForUpdate()) { | 1081 if (CanAutorestartForUpdate()) { |
1072 DLOG(WARNING) << "Detected update. Restarting browser."; | 1082 DLOG(WARNING) << "Detected update. Restarting browser."; |
1073 RestartPersistentInstance(); | 1083 RestartPersistentInstance(); |
1074 } | 1084 } |
1075 } | 1085 } |
1076 | 1086 |
1077 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1087 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |