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

Unified Diff: chrome/browser/plugins/plugin_status_pref_setter.cc

Issue 2063863002: Use DCHECKs when observing only a single notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/plugins/plugin_status_pref_setter.cc
diff --git a/chrome/browser/plugins/plugin_status_pref_setter.cc b/chrome/browser/plugins/plugin_status_pref_setter.cc
index c4ba835a4ea36574d1e751c9c15ebfbdde68b498..2fcb984d0e874e49ac0629c2fd9e36d5130aad96 100644
--- a/chrome/browser/plugins/plugin_status_pref_setter.cc
+++ b/chrome/browser/plugins/plugin_status_pref_setter.cc
@@ -44,11 +44,8 @@ void PluginStatusPrefSetter::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED) {
- StartUpdate();
- } else {
- NOTREACHED();
- }
+ DCHECK_EQ(chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, type);
+ StartUpdate();
}
void PluginStatusPrefSetter::StartUpdate() {

Powered by Google App Engine
This is Rietveld 408576698