Chromium Code Reviews| 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- | 939 // Initialize the disk cache policies. These policies are not hot update- |
| 940 // able so we need to have it when initializing the profiles. | 940 // able so we need to have them when initializing the profiles. |
| 941 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); | 941 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); |
| 942 local_state_->RegisterIntegerPref(prefs::kDiskCacheSize, 0); | |
| 943 local_state_->RegisterIntegerPref(prefs::kMediaCacheSize, 0); | |
|
Joao da Silva
2011/11/15 14:12:53
See other comments; I think these policies shouldn
| |
| 942 | 944 |
| 943 // Another policy that needs to be defined before the net subsystem is | 945 // Another policy that needs to be defined before the net subsystem is |
| 944 // initialized is MaxConnectionsPerProxy so we do it here. | 946 // initialized is MaxConnectionsPerProxy so we do it here. |
| 945 local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, | 947 local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
| 946 net::kDefaultMaxSocketsPerProxyServer); | 948 net::kDefaultMaxSocketsPerProxyServer); |
| 947 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); | 949 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); |
| 948 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( | 950 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( |
| 949 std::max(std::min(max_per_proxy, 99), | 951 std::max(std::min(max_per_proxy, 99), |
| 950 net::ClientSocketPoolManager::max_sockets_per_group())); | 952 net::ClientSocketPoolManager::max_sockets_per_group())); |
| 951 | 953 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1150 } | 1152 } |
| 1151 | 1153 |
| 1152 void BrowserProcessImpl::OnAutoupdateTimer() { | 1154 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1153 if (CanAutorestartForUpdate()) { | 1155 if (CanAutorestartForUpdate()) { |
| 1154 DLOG(WARNING) << "Detected update. Restarting browser."; | 1156 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1155 RestartBackgroundInstance(); | 1157 RestartBackgroundInstance(); |
| 1156 } | 1158 } |
| 1157 } | 1159 } |
| 1158 | 1160 |
| 1159 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1161 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |