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

Unified Diff: chrome/browser/android/tab_web_contents_delegate_android.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 | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_web_contents_delegate_android.cc
diff --git a/chrome/browser/android/tab_web_contents_delegate_android.cc b/chrome/browser/android/tab_web_contents_delegate_android.cc
index 19d6e52a5c14e554aa37ec9b29783cb62a8c3a40..81f87c8c36ef1e3c09f55b6ef5126a339dc2c808 100644
--- a/chrome/browser/android/tab_web_contents_delegate_android.cc
+++ b/chrome/browser/android/tab_web_contents_delegate_android.cc
@@ -165,16 +165,10 @@ void TabWebContentsDelegateAndroid::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_FIND_RESULT_AVAILABLE:
- OnFindResultAvailable(
- content::Source<WebContents>(source).ptr(),
- content::Details<FindNotificationDetails>(details).ptr());
- break;
- default:
- NOTREACHED() << "Unexpected notification: " << type;
- break;
- }
+ DCHECK_EQ(chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, type);
+ OnFindResultAvailable(
+ content::Source<WebContents>(source).ptr(),
+ content::Details<FindNotificationDetails>(details).ptr());
}
blink::WebDisplayMode TabWebContentsDelegateAndroid::GetDisplayMode(
« no previous file with comments | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698