Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3248)

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 11307020: Cleanup: Simplify some extensions / content_settings Observer code by simply DCHECKING instead of u… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
===================================================================
--- chrome/browser/extensions/extension_service.cc (revision 164413)
+++ chrome/browser/extensions/extension_service.cc (working copy)
@@ -2591,14 +2591,12 @@
break;
}
case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name = content::Details<std::string>(details).ptr();
- if (*pref_name == prefs::kExtensionInstallAllowList ||
- *pref_name == prefs::kExtensionInstallDenyList) {
- IdentifyAlertableExtensions();
- CheckManagementPolicy();
- } else {
- NOTREACHED() << "Unexpected preference name.";
- }
+ const std::string& pref_name =
+ *content::Details<std::string>(details).ptr();
+ DCHECK(pref_name == prefs::kExtensionInstallAllowList ||
+ pref_name == prefs::kExtensionInstallDenyList);
Yoyo Zhou 2012/10/27 15:45:03 You can still emit the NOTREACHED message from the
Lei Zhang 2012/10/30 00:01:45 Done. I will also output |pref_name| so the error
+ IdentifyAlertableExtensions();
+ CheckManagementPolicy();
break;
}
case chrome::NOTIFICATION_IMPORT_FINISHED: {

Powered by Google App Engine
This is Rietveld 408576698