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

Unified Diff: chrome/browser/extensions/api/preference/preference_api.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/api/preference/preference_api.cc
===================================================================
--- chrome/browser/extensions/api/preference/preference_api.cc (revision 165014)
+++ chrome/browser/extensions/api/preference/preference_api.cc (working copy)
@@ -257,13 +257,9 @@
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- const std::string* pref_key =
- content::Details<const std::string>(details).ptr();
- OnPrefChanged(content::Source<PrefService>(source).ptr(), *pref_key);
- } else {
- NOTREACHED();
- }
+ DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type);
+ OnPrefChanged(content::Source<PrefService>(source).ptr(),
+ *content::Details<const std::string>(details).ptr());
}
void PreferenceEventRouter::OnPrefChanged(PrefService* pref_service,
« no previous file with comments | « chrome/browser/extensions/api/font_settings/font_settings_api.cc ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698