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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 } | 912 } |
913 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); | 913 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); |
914 | 914 |
915 // Initialize the preference for the plugin finder policy. | 915 // Initialize the preference for the plugin finder policy. |
916 // This preference is only needed on the IO thread so make it available there. | 916 // This preference is only needed on the IO thread so make it available there. |
917 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); | 917 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); |
918 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, | 918 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, |
919 local_state_.get(), NULL); | 919 local_state_.get(), NULL); |
920 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); | 920 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); |
921 | 921 |
| 922 // Initialize the disk cache location policy. This policy is not hot update- |
| 923 // able so we need to have it when initializing the profiles. |
| 924 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); |
| 925 |
922 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 926 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
923 // though, so it can't register itself. | 927 // though, so it can't register itself. |
924 local_state_->RegisterListPref(prefs::kDisabledSchemes); | 928 local_state_->RegisterListPref(prefs::kDisabledSchemes); |
925 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); | 929 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); |
926 ApplyDisabledSchemesPolicy(); | 930 ApplyDisabledSchemesPolicy(); |
927 } | 931 } |
928 | 932 |
929 void BrowserProcessImpl::CreateIconManager() { | 933 void BrowserProcessImpl::CreateIconManager() { |
930 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 934 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
931 created_icon_manager_ = true; | 935 created_icon_manager_ = true; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 } | 1123 } |
1120 | 1124 |
1121 void BrowserProcessImpl::OnAutoupdateTimer() { | 1125 void BrowserProcessImpl::OnAutoupdateTimer() { |
1122 if (CanAutorestartForUpdate()) { | 1126 if (CanAutorestartForUpdate()) { |
1123 DLOG(WARNING) << "Detected update. Restarting browser."; | 1127 DLOG(WARNING) << "Detected update. Restarting browser."; |
1124 RestartPersistentInstance(); | 1128 RestartPersistentInstance(); |
1125 } | 1129 } |
1126 } | 1130 } |
1127 | 1131 |
1128 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1132 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |