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

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

Issue 9764003: Increase number of max sockets per group for WebSocket connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | net/http/http_network_session.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 plugin_finder_disabled_pref_->Init(prefs::kDisablePluginFinder, 708 plugin_finder_disabled_pref_->Init(prefs::kDisablePluginFinder,
709 local_state_.get(), NULL); 709 local_state_.get(), NULL);
710 plugin_finder_disabled_pref_->MoveToThread(BrowserThread::IO); 710 plugin_finder_disabled_pref_->MoveToThread(BrowserThread::IO);
711 711
712 // Another policy that needs to be defined before the net subsystem is 712 // Another policy that needs to be defined before the net subsystem is
713 // initialized is MaxConnectionsPerProxy so we do it here. 713 // initialized is MaxConnectionsPerProxy so we do it here.
714 local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, 714 local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy,
715 net::kDefaultMaxSocketsPerProxyServer); 715 net::kDefaultMaxSocketsPerProxyServer);
716 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); 716 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy);
717 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( 717 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server(
718 net::HttpNetworkSession::NORMAL_SOCKET_POOL,
718 std::max(std::min(max_per_proxy, 99), 719 std::max(std::min(max_per_proxy, 99),
719 net::ClientSocketPoolManager::max_sockets_per_group())); 720 net::ClientSocketPoolManager::max_sockets_per_group(
721 net::HttpNetworkSession::NORMAL_SOCKET_POOL)));
720 722
721 // This is observed by ChildProcessSecurityPolicy, which lives in content/ 723 // This is observed by ChildProcessSecurityPolicy, which lives in content/
722 // though, so it can't register itself. 724 // though, so it can't register itself.
723 local_state_->RegisterListPref(prefs::kDisabledSchemes); 725 local_state_->RegisterListPref(prefs::kDisabledSchemes);
724 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); 726 pref_change_registrar_.Add(prefs::kDisabledSchemes, this);
725 ApplyDisabledSchemesPolicy(); 727 ApplyDisabledSchemesPolicy();
726 728
727 local_state_->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false); 729 local_state_->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false);
728 } 730 }
729 731
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 } 902 }
901 903
902 void BrowserProcessImpl::OnAutoupdateTimer() { 904 void BrowserProcessImpl::OnAutoupdateTimer() {
903 if (CanAutorestartForUpdate()) { 905 if (CanAutorestartForUpdate()) {
904 DLOG(WARNING) << "Detected update. Restarting browser."; 906 DLOG(WARNING) << "Detected update. Restarting browser.";
905 RestartBackgroundInstance(); 907 RestartBackgroundInstance();
906 } 908 }
907 } 909 }
908 910
909 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 911 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | net/http/http_network_session.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698