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

Unified Diff: chrome/browser/chromeos/policy/recommendation_restorer.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/chromeos/policy/recommendation_restorer.cc
diff --git a/chrome/browser/chromeos/policy/recommendation_restorer.cc b/chrome/browser/chromeos/policy/recommendation_restorer.cc
index 68defa9949f4782e7f17ebc158745a3ffe178dea..40908a15683402d6f1d02b5407ec868896dceedc 100644
--- a/chrome/browser/chromeos/policy/recommendation_restorer.cc
+++ b/chrome/browser/chromeos/policy/recommendation_restorer.cc
@@ -77,14 +77,12 @@ void RecommendationRestorer::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) {
- logged_in_ = true;
- notification_registrar_.RemoveAll();
- StopTimer();
- RestoreAll();
- } else {
- NOTREACHED();
- }
+ DCHECK_EQ(chrome::NOTIFICATION_LOGIN_USER_CHANGED, type);
+
+ logged_in_ = true;
+ notification_registrar_.RemoveAll();
+ StopTimer();
+ RestoreAll();
}
void RecommendationRestorer::OnUserActivity(const ui::Event* event) {

Powered by Google App Engine
This is Rietveld 408576698