| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/api/settings_private/prefs_util.h" | 5 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 10 #include "chrome/browser/extensions/settings_api_helpers.h" | 10 #include "chrome/browser/extensions/settings_api_helpers.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 (*s_whitelist)[::prefs::kWebKitFixedFontFamily] = | 114 (*s_whitelist)[::prefs::kWebKitFixedFontFamily] = |
| 115 settings_private::PrefType::PREF_TYPE_STRING; | 115 settings_private::PrefType::PREF_TYPE_STRING; |
| 116 (*s_whitelist)[::prefs::kWebKitSansSerifFontFamily] = | 116 (*s_whitelist)[::prefs::kWebKitSansSerifFontFamily] = |
| 117 settings_private::PrefType::PREF_TYPE_STRING; | 117 settings_private::PrefType::PREF_TYPE_STRING; |
| 118 (*s_whitelist)[::prefs::kWebKitSerifFontFamily] = | 118 (*s_whitelist)[::prefs::kWebKitSerifFontFamily] = |
| 119 settings_private::PrefType::PREF_TYPE_STRING; | 119 settings_private::PrefType::PREF_TYPE_STRING; |
| 120 (*s_whitelist)[::prefs::kWebKitStandardFontFamily] = | 120 (*s_whitelist)[::prefs::kWebKitStandardFontFamily] = |
| 121 settings_private::PrefType::PREF_TYPE_STRING; | 121 settings_private::PrefType::PREF_TYPE_STRING; |
| 122 (*s_whitelist)[::prefs::kDefaultCharset] = | 122 (*s_whitelist)[::prefs::kDefaultCharset] = |
| 123 settings_private::PrefType::PREF_TYPE_STRING; | 123 settings_private::PrefType::PREF_TYPE_STRING; |
| 124 #if defined(OS_MACOSX) |
| 125 (*s_whitelist)[::prefs::kWebkitTabsToLinks] = |
| 126 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 127 #endif |
| 124 | 128 |
| 125 // On startup. | 129 // On startup. |
| 126 (*s_whitelist)[::prefs::kRestoreOnStartup] = | 130 (*s_whitelist)[::prefs::kRestoreOnStartup] = |
| 127 settings_private::PrefType::PREF_TYPE_NUMBER; | 131 settings_private::PrefType::PREF_TYPE_NUMBER; |
| 128 (*s_whitelist)[::prefs::kURLsToRestoreOnStartup] = | 132 (*s_whitelist)[::prefs::kURLsToRestoreOnStartup] = |
| 129 settings_private::PrefType::PREF_TYPE_LIST; | 133 settings_private::PrefType::PREF_TYPE_LIST; |
| 130 | 134 |
| 131 // Downloads settings. | 135 // Downloads settings. |
| 132 (*s_whitelist)[::prefs::kDownloadDefaultDirectory] = | 136 (*s_whitelist)[::prefs::kDownloadDefaultDirectory] = |
| 133 settings_private::PrefType::PREF_TYPE_STRING; | 137 settings_private::PrefType::PREF_TYPE_STRING; |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_) | 781 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_) |
| 778 ->GetExtensionControllingPref(pref_object.key); | 782 ->GetExtensionControllingPref(pref_object.key); |
| 779 if (extension_id.empty()) | 783 if (extension_id.empty()) |
| 780 return nullptr; | 784 return nullptr; |
| 781 | 785 |
| 782 return ExtensionRegistry::Get(profile_)->GetExtensionById( | 786 return ExtensionRegistry::Get(profile_)->GetExtensionById( |
| 783 extension_id, ExtensionRegistry::ENABLED); | 787 extension_id, ExtensionRegistry::ENABLED); |
| 784 } | 788 } |
| 785 | 789 |
| 786 } // namespace extensions | 790 } // namespace extensions |
| OLD | NEW |