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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 } | 899 } |
900 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); | 900 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); |
901 | 901 |
902 // Initialize the preference for the plugin finder policy. | 902 // Initialize the preference for the plugin finder policy. |
903 // This preference is only needed on the IO thread so make it available there. | 903 // This preference is only needed on the IO thread so make it available there. |
904 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); | 904 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); |
905 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, | 905 plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder, |
906 local_state_.get(), NULL); | 906 local_state_.get(), NULL); |
907 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); | 907 plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO); |
908 | 908 |
| 909 // Initialize the disk cache location policy. This policy is not hot update- |
| 910 // able so we need to have it when initializing the profiles. |
| 911 local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath()); |
| 912 |
909 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 913 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
910 // though, so it can't register itself. | 914 // though, so it can't register itself. |
911 local_state_->RegisterListPref(prefs::kDisabledSchemes); | 915 local_state_->RegisterListPref(prefs::kDisabledSchemes); |
912 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); | 916 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); |
913 ApplyDisabledSchemesPolicy(); | 917 ApplyDisabledSchemesPolicy(); |
914 } | 918 } |
915 | 919 |
916 void BrowserProcessImpl::CreateIconManager() { | 920 void BrowserProcessImpl::CreateIconManager() { |
917 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 921 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
918 created_icon_manager_ = true; | 922 created_icon_manager_ = true; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 } | 1110 } |
1107 | 1111 |
1108 void BrowserProcessImpl::OnAutoupdateTimer() { | 1112 void BrowserProcessImpl::OnAutoupdateTimer() { |
1109 if (CanAutorestartForUpdate()) { | 1113 if (CanAutorestartForUpdate()) { |
1110 DLOG(WARNING) << "Detected update. Restarting browser."; | 1114 DLOG(WARNING) << "Detected update. Restarting browser."; |
1111 RestartPersistentInstance(); | 1115 RestartPersistentInstance(); |
1112 } | 1116 } |
1113 } | 1117 } |
1114 | 1118 |
1115 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1119 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |