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

Side by Side Diff: content/browser/ssl/ssl_policy.cc

Issue 1459473003: Add a WebContents getter callback in ResourceRequestInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comment Created 5 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
« no previous file with comments | « content/browser/ssl/ssl_manager.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ssl/ssl_policy.h" 5 #include "content/browser/ssl/ssl_policy.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 void SSLPolicy::OnCertErrorInternal(SSLCertErrorHandler* handler, 226 void SSLPolicy::OnCertErrorInternal(SSLCertErrorHandler* handler,
227 int options_mask) { 227 int options_mask) {
228 bool overridable = (options_mask & OVERRIDABLE) != 0; 228 bool overridable = (options_mask & OVERRIDABLE) != 0;
229 bool strict_enforcement = (options_mask & STRICT_ENFORCEMENT) != 0; 229 bool strict_enforcement = (options_mask & STRICT_ENFORCEMENT) != 0;
230 bool expired_previous_decision = 230 bool expired_previous_decision =
231 (options_mask & EXPIRED_PREVIOUS_DECISION) != 0; 231 (options_mask & EXPIRED_PREVIOUS_DECISION) != 0;
232 CertificateRequestResultType result = 232 CertificateRequestResultType result =
233 CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE; 233 CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE;
234 GetContentClient()->browser()->AllowCertificateError( 234 GetContentClient()->browser()->AllowCertificateError(
235 handler->render_process_id(), 235 handler->GetManager()->controller()->GetWebContents(),
236 handler->render_frame_id(), 236 handler->cert_error(), handler->ssl_info(), handler->request_url(),
237 handler->cert_error(), 237 handler->resource_type(), overridable, strict_enforcement,
238 handler->ssl_info(),
239 handler->request_url(),
240 handler->resource_type(),
241 overridable,
242 strict_enforcement,
243 expired_previous_decision, 238 expired_previous_decision,
244 base::Bind(&SSLPolicy::OnAllowCertificate, 239 base::Bind(&SSLPolicy::OnAllowCertificate, base::Unretained(this),
245 base::Unretained(this),
246 make_scoped_refptr(handler)), 240 make_scoped_refptr(handler)),
247 &result); 241 &result);
248 switch (result) { 242 switch (result) {
249 case CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE: 243 case CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE:
250 break; 244 break;
251 case CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL: 245 case CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL:
252 handler->CancelRequest(); 246 handler->CancelRequest();
253 break; 247 break;
254 case CERTIFICATE_REQUEST_RESULT_TYPE_DENY: 248 case CERTIFICATE_REQUEST_RESULT_TYPE_DENY:
255 handler->DenyRequest(); 249 handler->DenyRequest();
(...skipping 11 matching lines...) Expand all
267 entry->GetURL(), entry->GetSSL().cert_id, entry->GetSSL().cert_status); 261 entry->GetURL(), entry->GetSSL().cert_id, entry->GetSSL().cert_status);
268 } 262 }
269 263
270 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { 264 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {
271 GURL parsed_origin(origin); 265 GURL parsed_origin(origin);
272 if (parsed_origin.SchemeIsCryptographic()) 266 if (parsed_origin.SchemeIsCryptographic())
273 backend_->HostRanInsecureContent(parsed_origin.host(), pid); 267 backend_->HostRanInsecureContent(parsed_origin.host(), pid);
274 } 268 }
275 269
276 } // namespace content 270 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/ssl/ssl_manager.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698