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

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

Issue 2542533004: Override DevTools security summary when a Safe Browsing warning shows. (Closed)
Patch Set: Redefine event parameter (optional instead of nullable) for Closure Compiler Created 4 years 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_summary(security_style_explanations.summary)
estark 2016/12/07 01:00:09 Maybe you only want to set this if |summary| is no
135 ->set_insecure_content_status(insecure_content_status) 136 ->set_insecure_content_status(insecure_content_status)
136 ->set_explanations(explanations)); 137 ->set_explanations(explanations));
137 } 138 }
138 139
139 Response SecurityHandler::Enable() { 140 Response SecurityHandler::Enable() {
140 enabled_ = true; 141 enabled_ = true;
141 if (host_) 142 if (host_)
142 AttachToRenderFrameHost(); 143 AttachToRenderFrameHost();
143 144
144 return Response::OK(); 145 return Response::OK();
(...skipping 14 matching lines...) Expand all
159 if (!certificate) 160 if (!certificate)
160 return Response::InternalError("Could not find certificate"); 161 return Response::InternalError("Could not find certificate");
161 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( 162 web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
162 web_contents, certificate); 163 web_contents, certificate);
163 return Response::OK(); 164 return Response::OK();
164 } 165 }
165 166
166 } // namespace security 167 } // namespace security
167 } // namespace devtools 168 } // namespace devtools
168 } // namespace content 169 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698