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

Unified Diff: chrome/browser/service_process/service_process_control.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/service_process/service_process_control.cc
diff --git a/chrome/browser/service_process/service_process_control.cc b/chrome/browser/service_process/service_process_control.cc
index 796ed4fbdb1b505bee741181f960d4ff74a9639c..99769c5e48cd33cb902c202f61b2e3589a9792a9 100644
--- a/chrome/browser/service_process/service_process_control.cc
+++ b/chrome/browser/service_process/service_process_control.cc
@@ -204,9 +204,8 @@ void ServiceProcessControl::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) {
- Send(new ServiceMsg_UpdateAvailable);
- }
+ DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type);
+ Send(new ServiceMsg_UpdateAvailable);
}
void ServiceProcessControl::OnCloudPrintProxyInfo(
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_service.cc ('k') | chrome/browser/spellchecker/spellcheck_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698