Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 7326011: Revert 91842 - Introduce a policy to control the maximal number of connections per proxy server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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"
81 #include "net/url_request/url_request_context_getter.h" 80 #include "net/url_request/url_request_context_getter.h"
82 #include "ui/base/clipboard/clipboard.h" 81 #include "ui/base/clipboard/clipboard.h"
83 #include "ui/base/l10n/l10n_util.h" 82 #include "ui/base/l10n/l10n_util.h"
84 #include "webkit/plugins/npapi/plugin_list.h" 83 #include "webkit/plugins/npapi/plugin_list.h"
85 84
86 #if defined(OS_WIN) 85 #if defined(OS_WIN)
87 #include "views/focus/view_storage.h" 86 #include "views/focus/view_storage.h"
88 #endif 87 #endif
89 88
90 #if defined(IPC_MESSAGE_LOG_ENABLED) 89 #if defined(IPC_MESSAGE_LOG_ENABLED)
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 // This preference is only needed on the IO thread so make it available there. 842 // This preference is only needed on the IO thread so make it available there.
844 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); 843 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false);
845 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, 844 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder,
846 local_state_.get(), NULL); 845 local_state_.get(), NULL);
847 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); 846 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO);
848 847
849 // Initialize the disk cache location policy. This policy is not hot update- 848 // Initialize the disk cache location policy. This policy is not hot update-
850 // able so we need to have it when initializing the profiles. 849 // able so we need to have it when initializing the profiles.
851 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); 850 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath());
852 851
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
862 // This is observed by ChildProcessSecurityPolicy, which lives in content/ 852 // This is observed by ChildProcessSecurityPolicy, which lives in content/
863 // though, so it can't register itself. 853 // though, so it can't register itself.
864 local_state_->RegisterListPref(prefs::kDisabledSchemes); 854 local_state_->RegisterListPref(prefs::kDisabledSchemes);
865 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); 855 pref_change_registrar_.Add(prefs::kDisabledSchemes, this);
866 ApplyDisabledSchemesPolicy(); 856 ApplyDisabledSchemesPolicy();
867 } 857 }
868 858
869 void BrowserProcessImpl::CreateIconManager() { 859 void BrowserProcessImpl::CreateIconManager() {
870 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); 860 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL);
871 created_icon_manager_ = true; 861 created_icon_manager_ = true;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 } 1068 }
1079 1069
1080 void BrowserProcessImpl::OnAutoupdateTimer() { 1070 void BrowserProcessImpl::OnAutoupdateTimer() {
1081 if (CanAutorestartForUpdate()) { 1071 if (CanAutorestartForUpdate()) {
1082 DLOG(WARNING) << "Detected update. Restarting browser."; 1072 DLOG(WARNING) << "Detected update. Restarting browser.";
1083 RestartPersistentInstance(); 1073 RestartPersistentInstance();
1084 } 1074 }
1085 } 1075 }
1086 1076
1087 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1077 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/policy/configuration_policy_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698