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

Unified Diff: chrome/browser/ssl/ssl_error_handler.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/ssl/ssl_error_handler.cc
diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc
index 4f58013e0632ef938a3b0f7310622822d51d0b33..0efa0e997c183f2d2b23bca99d54a2a318a409f6 100644
--- a/chrome/browser/ssl/ssl_error_handler.cc
+++ b/chrome/browser/ssl/ssl_error_handler.cc
@@ -379,15 +379,15 @@ void SSLErrorHandler::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
- if (type == chrome::NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT) {
- timer_.Stop();
- CaptivePortalService::Results* results =
- content::Details<CaptivePortalService::Results>(details).ptr();
- if (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL)
- ShowCaptivePortalInterstitial(results->landing_url);
- else
- ShowSSLInterstitial();
- }
+ DCHECK_EQ(chrome::NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT, type);
+
+ timer_.Stop();
+ CaptivePortalService::Results* results =
+ content::Details<CaptivePortalService::Results>(details).ptr();
+ if (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL)
+ ShowCaptivePortalInterstitial(results->landing_url);
+ else
+ ShowSSLInterstitial();
#endif
}
« no previous file with comments | « chrome/browser/ssl/ssl_client_auth_observer.cc ('k') | chrome/browser/task_manager/web_contents_information.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698