Index: chrome/browser/extensions/extension_prefs.cc |
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc |
index 4bc61a8ab686586a58617af905d4a00dea0a5414..be84dadd55057dd961cdf6e7e8457c58523745da 100644 |
--- a/chrome/browser/extensions/extension_prefs.cc |
+++ b/chrome/browser/extensions/extension_prefs.cc |
@@ -1253,9 +1253,14 @@ void ExtensionPrefs::SetExtensionControlledPref(const std::string& extension_id, |
const std::string& pref_key, |
bool incognito, |
Value* value) { |
- DCHECK(pref_service()->FindPreference(pref_key.c_str())) |
- << "Extension controlled preference key " << pref_key |
- << " not registered."; |
+#ifndef NDEBUG |
Aaron Boodman
2011/02/11 18:33:19
I think you should do this in all situations, not
Bernhard Bauer
2011/02/13 18:19:12
So, also make them into |CHECK|s? Ideally, we'd al
Aaron Boodman
2011/02/14 02:54:02
I see. Ok, I don't feel so strongly about this cas
|
+ const PrefService::Preference* pref = |
+ pref_service()->FindPreference(pref_key.c_str()); |
+ DCHECK(pref) << "Extension controlled preference key " << pref_key |
+ << " not registered."; |
+ DCHECK_EQ(pref->GetType(), value->GetType()) |
+ << "Extension controlled preference " << pref_key << " has wrong type."; |
+#endif |
if (!incognito) { |
// Also store in persisted Preferences file to recover after a |