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

Unified Diff: chrome/browser/extensions/component_loader.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: Flip DCHECK_EQ arguments to (expected, actual) 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/component_loader.cc
===================================================================
--- chrome/browser/extensions/component_loader.cc (revision 165014)
+++ chrome/browser/extensions/component_loader.cc (working copy)
@@ -411,16 +411,10 @@
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- const std::string* name =
- content::Details<const std::string>(details).ptr();
- if (*name == prefs::kEnterpriseWebStoreURL)
- AddOrReloadEnterpriseWebStore();
- else
- NOTREACHED();
- } else {
- NOTREACHED();
- }
+ DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type);
+ DCHECK_EQ(std::string(prefs::kEnterpriseWebStoreURL),
+ *content::Details<const std::string>(details).ptr());
+ AddOrReloadEnterpriseWebStore();
}
// static
« no previous file with comments | « chrome/browser/extensions/api/preference/preference_api.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698