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

Side by Side Diff: content/browser/devtools/protocol/security_handler.cc

Issue 2522733002: Do not prompt for reload when security panel is opened on an interstitial (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/devtools/protocol/security_handler.h" 5 #include "content/browser/devtools/protocol/security_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ->set_displayed_insecure_content_style( 125 ->set_displayed_insecure_content_style(
126 SecurityStyleToProtocolSecurityState( 126 SecurityStyleToProtocolSecurityState(
127 security_style_explanations 127 security_style_explanations
128 .displayed_insecure_content_style)); 128 .displayed_insecure_content_style));
129 129
130 client_->SecurityStateChanged( 130 client_->SecurityStateChanged(
131 SecurityStateChangedParams::Create() 131 SecurityStateChangedParams::Create()
132 ->set_security_state(security_state) 132 ->set_security_state(security_state)
133 ->set_scheme_is_cryptographic( 133 ->set_scheme_is_cryptographic(
134 security_style_explanations.scheme_is_cryptographic) 134 security_style_explanations.scheme_is_cryptographic)
135 ->set_interstitial_is_showing(WebContents::FromRenderFrameHost(host_)
136 ->ShowingInterstitialPage())
135 ->set_insecure_content_status(insecure_content_status) 137 ->set_insecure_content_status(insecure_content_status)
136 ->set_explanations(explanations)); 138 ->set_explanations(explanations));
137 } 139 }
138 140
139 Response SecurityHandler::Enable() { 141 Response SecurityHandler::Enable() {
140 enabled_ = true; 142 enabled_ = true;
141 if (host_) 143 if (host_)
142 AttachToRenderFrameHost(); 144 AttachToRenderFrameHost();
143 145
144 return Response::OK(); 146 return Response::OK();
(...skipping 14 matching lines...) Expand all
159 if (!certificate) 161 if (!certificate)
160 return Response::InternalError("Could not find certificate"); 162 return Response::InternalError("Could not find certificate");
161 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( 163 web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
162 web_contents, certificate); 164 web_contents, certificate);
163 return Response::OK(); 165 return Response::OK();
164 } 166 }
165 167
166 } // namespace security 168 } // namespace security
167 } // namespace devtools 169 } // namespace devtools
168 } // namespace content 170 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698