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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 734 DCHECK(!created_local_state_ && local_state_.get() == NULL); | 734 DCHECK(!created_local_state_ && local_state_.get() == NULL); |
| 735 created_local_state_ = true; | 735 created_local_state_ = true; |
| 736 | 736 |
| 737 FilePath local_state_path; | 737 FilePath local_state_path; |
| 738 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); | 738 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); |
| 739 local_state_.reset( | 739 local_state_.reset( |
| 740 PrefService::CreatePrefService(local_state_path, NULL, NULL)); | 740 PrefService::CreatePrefService(local_state_path, NULL, NULL)); |
| 741 | 741 |
| 742 pref_change_registrar_.Init(local_state_.get()); | 742 pref_change_registrar_.Init(local_state_.get()); |
| 743 | 743 |
| 744 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); | |
|
Bernhard Bauer
2011/02/15 13:25:12
I'm not sure when this trend of registering prefer
| |
| 744 // Make sure the the plugin updater gets notifications of changes | 745 // Make sure the the plugin updater gets notifications of changes |
| 745 // in the plugin blacklist. | 746 // in the plugin blacklist. |
| 746 local_state_->RegisterListPref(prefs::kPluginsPluginsBlacklist); | 747 local_state_->RegisterListPref(prefs::kPluginsPluginsBlacklist); |
| 747 pref_change_registrar_.Add(prefs::kPluginsPluginsBlacklist, | 748 pref_change_registrar_.Add(prefs::kPluginsPluginsBlacklist, |
| 748 PluginUpdater::GetInstance()); | 749 PluginUpdater::GetInstance()); |
| 749 | 750 |
| 750 // Initialize and set up notifications for the printing enabled | 751 // Initialize and set up notifications for the printing enabled |
| 751 // preference. | 752 // preference. |
| 752 local_state_->RegisterBooleanPref(prefs::kPrintingEnabled, true); | 753 local_state_->RegisterBooleanPref(prefs::kPrintingEnabled, true); |
| 753 bool printing_enabled = | 754 bool printing_enabled = |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 947 } | 948 } |
| 948 | 949 |
| 949 void BrowserProcessImpl::OnAutoupdateTimer() { | 950 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 950 if (CanAutorestartForUpdate()) { | 951 if (CanAutorestartForUpdate()) { |
| 951 DLOG(WARNING) << "Detected update. Restarting browser."; | 952 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 952 RestartPersistentInstance(); | 953 RestartPersistentInstance(); |
| 953 } | 954 } |
| 954 } | 955 } |
| 955 | 956 |
| 956 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 957 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |