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

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: Address review feedback 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/frame_host/render_frame_host_impl.h" 9 #include "content/browser/frame_host/render_frame_host_impl.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 .SetRanInsecureContentStyle(SecurityStyleToProtocolSecurityState( 122 .SetRanInsecureContentStyle(SecurityStyleToProtocolSecurityState(
123 security_style_explanations.ran_insecure_content_style)) 123 security_style_explanations.ran_insecure_content_style))
124 .SetDisplayedInsecureContentStyle( 124 .SetDisplayedInsecureContentStyle(
125 SecurityStyleToProtocolSecurityState( 125 SecurityStyleToProtocolSecurityState(
126 security_style_explanations 126 security_style_explanations
127 .displayed_insecure_content_style)) 127 .displayed_insecure_content_style))
128 .Build(); 128 .Build();
129 129
130 frontend_->SecurityStateChanged( 130 frontend_->SecurityStateChanged(
131 security_state, 131 security_state,
132 Maybe<Explanations>(std::move(explanations)), 132 security_style_explanations.scheme_is_cryptographic,
133 Maybe<Security::InsecureContentStatus>(std::move(insecure_status)), 133 std::move(explanations),
134 Maybe<bool>(security_style_explanations.scheme_is_cryptographic)); 134 std::move(insecure_status),
135 Maybe<std::string>(security_style_explanations.summary));
135 } 136 }
136 137
137 Response SecurityHandler::Enable() { 138 Response SecurityHandler::Enable() {
138 enabled_ = true; 139 enabled_ = true;
139 if (host_) 140 if (host_)
140 AttachToRenderFrameHost(); 141 AttachToRenderFrameHost();
141 142
142 return Response::OK(); 143 return Response::OK();
143 } 144 }
144 145
(...skipping 11 matching lines...) Expand all
156 web_contents->GetController().GetVisibleEntry()->GetSSL().certificate; 157 web_contents->GetController().GetVisibleEntry()->GetSSL().certificate;
157 if (!certificate) 158 if (!certificate)
158 return Response::Error("Could not find certificate"); 159 return Response::Error("Could not find certificate");
159 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( 160 web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
160 web_contents, certificate); 161 web_contents, certificate);
161 return Response::OK(); 162 return Response::OK();
162 } 163 }
163 164
164 } // namespace protocol 165 } // namespace protocol
165 } // namespace content 166 } // namespace content
OLDNEW
« no previous file with comments | « components/security_state_strings.grdp ('k') | content/public/browser/security_style_explanations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698