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

Unified Diff: chrome/browser/web_applications/update_shortcut_worker_win.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
« no previous file with comments | « chrome/browser/task_manager/web_contents_information.cc ('k') | chrome/test/base/find_in_page_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/update_shortcut_worker_win.cc
diff --git a/chrome/browser/web_applications/update_shortcut_worker_win.cc b/chrome/browser/web_applications/update_shortcut_worker_win.cc
index cce42b26156dac76f7d876d634d621b0af2e012b..ddb0e9dcbd6234c0b1df85b3daa989818d740c7f 100644
--- a/chrome/browser/web_applications/update_shortcut_worker_win.cc
+++ b/chrome/browser/web_applications/update_shortcut_worker_win.cc
@@ -65,11 +65,12 @@ void UpdateShortcutWorker::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_TAB_CLOSING &&
- content::Source<NavigationController>(source).ptr() ==
- &web_contents_->GetController()) {
+ DCHECK_EQ(chrome::NOTIFICATION_TAB_CLOSING, type);
+
+ if (content::Source<NavigationController>(source).ptr() ==
+ &web_contents_->GetController()) {
// Underlying tab is closing.
- web_contents_ = NULL;
+ web_contents_ = nullptr;
}
}
« no previous file with comments | « chrome/browser/task_manager/web_contents_information.cc ('k') | chrome/test/base/find_in_page_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698