| 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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 ApplyDefaultBrowserPolicy(); | 929 ApplyDefaultBrowserPolicy(); |
| 930 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); | 930 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); |
| 931 | 931 |
| 932 // Initialize the preference for the plugin finder policy. | 932 // Initialize the preference for the plugin finder policy. |
| 933 // This preference is only needed on the IO thread so make it available there. | 933 // This preference is only needed on the IO thread so make it available there. |
| 934 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); | 934 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); |
| 935 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, | 935 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, |
| 936 local_state_.get(), NULL); | 936 local_state_.get(), NULL); |
| 937 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); | 937 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); |
| 938 | 938 |
| 939 // Initialize the disk cache location policy. This policy is not hot update- | |
| 940 // able so we need to have it when initializing the profiles. | |
| 941 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); | |
| 942 | |
| 943 // Another policy that needs to be defined before the net subsystem is | 939 // Another policy that needs to be defined before the net subsystem is |
| 944 // initialized is MaxConnectionsPerProxy so we do it here. | 940 // initialized is MaxConnectionsPerProxy so we do it here. |
| 945 local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, | 941 local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
| 946 net::kDefaultMaxSocketsPerProxyServer); | 942 net::kDefaultMaxSocketsPerProxyServer); |
| 947 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); | 943 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); |
| 948 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( | 944 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( |
| 949 std::max(std::min(max_per_proxy, 99), | 945 std::max(std::min(max_per_proxy, 99), |
| 950 net::ClientSocketPoolManager::max_sockets_per_group())); | 946 net::ClientSocketPoolManager::max_sockets_per_group())); |
| 951 | 947 |
| 952 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 948 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 } | 1146 } |
| 1151 | 1147 |
| 1152 void BrowserProcessImpl::OnAutoupdateTimer() { | 1148 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1153 if (CanAutorestartForUpdate()) { | 1149 if (CanAutorestartForUpdate()) { |
| 1154 DLOG(WARNING) << "Detected update. Restarting browser."; | 1150 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1155 RestartBackgroundInstance(); | 1151 RestartBackgroundInstance(); |
| 1156 } | 1152 } |
| 1157 } | 1153 } |
| 1158 | 1154 |
| 1159 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1155 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |