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

Unified Diff: chrome/browser/infobars/insecure_content_infobar_delegate.cc

Issue 56123010: [InfoBar] remove unnecesary checks from some delegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/infobars/insecure_content_infobar_delegate.cc
diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.cc b/chrome/browser/infobars/insecure_content_infobar_delegate.cc
index 9e568371d9fb27206301d2d0c66a2810aca345ea..78685537855f9d1e2097c80245dbded7f693addc 100644
--- a/chrome/browser/infobars/insecure_content_infobar_delegate.cc
+++ b/chrome/browser/infobars/insecure_content_infobar_delegate.cc
@@ -82,7 +82,6 @@ bool InsecureContentInfoBarDelegate::Accept() {
return true;
}
-
// Cancel button is labelled "load anyways". It triggers Cancel(), but really
// means become insecure, so do the work of reloading the page.
bool InsecureContentInfoBarDelegate::Cancel() {
@@ -90,14 +89,13 @@ bool InsecureContentInfoBarDelegate::Cancel() {
(type_ == DISPLAY) ? DISPLAY_USER_OVERRIDE : RUN_USER_OVERRIDE,
NUM_EVENTS);
- if (web_contents()) {
- int32 routing_id = web_contents()->GetRoutingID();
- web_contents()->Send((type_ == DISPLAY) ?
- static_cast<IPC::Message*>(
- new ChromeViewMsg_SetAllowDisplayingInsecureContent(routing_id,
- true)) :
- new ChromeViewMsg_SetAllowRunningInsecureContent(routing_id, true));
- }
+ int32 routing_id = web_contents()->GetRoutingID();
+ web_contents()->Send(
Peter Kasting 2013/11/04 22:14:19 Nit: The old wrapping (for this whole block) was c
Miguel Garcia 2013/11/05 14:17:56 Done.
+ (type_ == DISPLAY)
+ ? static_cast<IPC::Message*>(
+ new ChromeViewMsg_SetAllowDisplayingInsecureContent(routing_id,
+ true))
+ : new ChromeViewMsg_SetAllowRunningInsecureContent(routing_id, true));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698