| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/extension_prefs.h" | 5 #include "chrome/browser/extensions/extension_prefs.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_notifier.h" | 7 #include "base/prefs/pref_notifier.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 | 1674 |
| 1675 void ExtensionPrefs::SetNeedsStorageGarbageCollection(bool value) { | 1675 void ExtensionPrefs::SetNeedsStorageGarbageCollection(bool value) { |
| 1676 prefs_->SetBoolean(prefs::kExtensionStorageGarbageCollect, value); | 1676 prefs_->SetBoolean(prefs::kExtensionStorageGarbageCollect, value); |
| 1677 } | 1677 } |
| 1678 | 1678 |
| 1679 bool ExtensionPrefs::NeedsStorageGarbageCollection() { | 1679 bool ExtensionPrefs::NeedsStorageGarbageCollection() { |
| 1680 return prefs_->GetBoolean(prefs::kExtensionStorageGarbageCollect); | 1680 return prefs_->GetBoolean(prefs::kExtensionStorageGarbageCollect); |
| 1681 } | 1681 } |
| 1682 | 1682 |
| 1683 // static | 1683 // static |
| 1684 void ExtensionPrefs::RegisterUserPrefs( | 1684 void ExtensionPrefs::RegisterProfilePrefs( |
| 1685 user_prefs::PrefRegistrySyncable* registry) { | 1685 user_prefs::PrefRegistrySyncable* registry) { |
| 1686 registry->RegisterDictionaryPref( | 1686 registry->RegisterDictionaryPref( |
| 1687 kExtensionsPref, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 1687 kExtensionsPref, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 1688 registry->RegisterListPref(prefs::kExtensionToolbar, | 1688 registry->RegisterListPref(prefs::kExtensionToolbar, |
| 1689 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 1689 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 1690 registry->RegisterIntegerPref( | 1690 registry->RegisterIntegerPref( |
| 1691 prefs::kExtensionToolbarSize, | 1691 prefs::kExtensionToolbarSize, |
| 1692 -1, // default value | 1692 -1, // default value |
| 1693 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 1693 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 1694 registry->RegisterDictionaryPref( | 1694 registry->RegisterDictionaryPref( |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 is_enabled = initial_state == Extension::ENABLED; | 1835 is_enabled = initial_state == Extension::ENABLED; |
| 1836 } | 1836 } |
| 1837 | 1837 |
| 1838 extension_pref_value_map_->RegisterExtension(extension_id, install_time, | 1838 extension_pref_value_map_->RegisterExtension(extension_id, install_time, |
| 1839 is_enabled); | 1839 is_enabled); |
| 1840 content_settings_store_->RegisterExtension(extension_id, install_time, | 1840 content_settings_store_->RegisterExtension(extension_id, install_time, |
| 1841 is_enabled); | 1841 is_enabled); |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 } // namespace extensions | 1844 } // namespace extensions |
| OLD | NEW |