Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_manager.h" | 5 #include "content/browser/ssl/ssl_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 bool overridable = (options_mask & OVERRIDABLE) != 0; | 349 bool overridable = (options_mask & OVERRIDABLE) != 0; |
| 350 bool strict_enforcement = (options_mask & STRICT_ENFORCEMENT) != 0; | 350 bool strict_enforcement = (options_mask & STRICT_ENFORCEMENT) != 0; |
| 351 bool expired_previous_decision = | 351 bool expired_previous_decision = |
| 352 (options_mask & EXPIRED_PREVIOUS_DECISION) != 0; | 352 (options_mask & EXPIRED_PREVIOUS_DECISION) != 0; |
| 353 | 353 |
| 354 WebContents* web_contents = handler->web_contents(); | 354 WebContents* web_contents = handler->web_contents(); |
| 355 int cert_error = handler->cert_error(); | 355 int cert_error = handler->cert_error(); |
| 356 const net::SSLInfo& ssl_info = handler->ssl_info(); | 356 const net::SSLInfo& ssl_info = handler->ssl_info(); |
| 357 const GURL& request_url = handler->request_url(); | 357 const GURL& request_url = handler->request_url(); |
| 358 ResourceType resource_type = handler->resource_type(); | 358 ResourceType resource_type = handler->resource_type(); |
| 359 GetContentClient()->browser()->AllowCertificateError( | 359 |
| 360 web_contents, cert_error, ssl_info, request_url, resource_type, | 360 base::Callback<void(content::CertificateRequestResultType)> callback = |
| 361 overridable, strict_enforcement, expired_previous_decision, | |
| 362 base::Bind(&OnAllowCertificate, base::Owned(handler.release()), | 361 base::Bind(&OnAllowCertificate, base::Owned(handler.release()), |
| 363 ssl_host_state_delegate_)); | 362 ssl_host_state_delegate_); |
| 363 | |
| 364 if (!web_contents->NotifyCertificateError(callback)) { | |
|
pfeldman
2017/02/08 18:24:00
Fetch devtools_agent_host_impl associated with the
irisu
2017/02/14 05:46:14
I'm not exactly sure how to do this. I can fetch t
Eric Seckler
2017/02/14 18:42:24
We could add a static method to RenderFrameDevTool
pfeldman
2017/02/14 19:00:24
Something like that would do, I would even put thi
irisu
2017/02/16 00:24:30
I've added this in RenderFrameDevToolsAgentHost fo
| |
| 365 GetContentClient()->browser()->AllowCertificateError( | |
| 366 web_contents, cert_error, ssl_info, request_url, resource_type, | |
| 367 overridable, strict_enforcement, expired_previous_decision, callback); | |
| 368 } | |
| 364 } | 369 } |
| 365 | 370 |
| 366 void SSLManager::UpdateEntry(NavigationEntryImpl* entry, | 371 void SSLManager::UpdateEntry(NavigationEntryImpl* entry, |
| 367 int add_content_status_flags, | 372 int add_content_status_flags, |
| 368 int remove_content_status_flags) { | 373 int remove_content_status_flags) { |
| 369 // We don't always have a navigation entry to update, for example in the | 374 // We don't always have a navigation entry to update, for example in the |
| 370 // case of the Web Inspector. | 375 // case of the Web Inspector. |
| 371 if (!entry) | 376 if (!entry) |
| 372 return; | 377 return; |
| 373 | 378 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 421 SSLManagerSet* managers = | 426 SSLManagerSet* managers = |
| 422 static_cast<SSLManagerSet*>(context->GetUserData(kSSLManagerKeyName)); | 427 static_cast<SSLManagerSet*>(context->GetUserData(kSSLManagerKeyName)); |
| 423 | 428 |
| 424 for (std::set<SSLManager*>::iterator i = managers->get().begin(); | 429 for (std::set<SSLManager*>::iterator i = managers->get().begin(); |
| 425 i != managers->get().end(); ++i) { | 430 i != managers->get().end(); ++i) { |
| 426 (*i)->UpdateEntry((*i)->controller()->GetLastCommittedEntry(), 0, 0); | 431 (*i)->UpdateEntry((*i)->controller()->GetLastCommittedEntry(), 0, 0); |
| 427 } | 432 } |
| 428 } | 433 } |
| 429 | 434 |
| 430 } // namespace content | 435 } // namespace content |
| OLD | NEW |