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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // https://crbug.com/86537. In this case we have to make a decision in this | 98 // https://crbug.com/86537. In this case we have to make a decision in this |
99 // function, so we ignore revocation check failures. | 99 // function, so we ignore revocation check failures. |
100 if (net::IsCertStatusMinorError(ssl_info.cert_status)) { | 100 if (net::IsCertStatusMinorError(ssl_info.cert_status)) { |
101 handler->ContinueRequest(); | 101 handler->ContinueRequest(); |
102 } else { | 102 } else { |
103 handler->CancelRequest(); | 103 handler->CancelRequest(); |
104 } | 104 } |
105 return; | 105 return; |
106 } | 106 } |
107 | 107 |
108 SSLManager* manager = | 108 NavigationControllerImpl* controller = |
109 static_cast<NavigationControllerImpl*>(&web_contents->GetController()) | 109 static_cast<NavigationControllerImpl*>(&web_contents->GetController()); |
110 ->ssl_manager(); | 110 controller->SetPendingNavigationSSLError(true); |
| 111 |
| 112 SSLManager* manager = controller->ssl_manager(); |
111 manager->OnCertError(std::move(handler)); | 113 manager->OnCertError(std::move(handler)); |
112 } | 114 } |
113 | 115 |
114 } // namespace | 116 } // namespace |
115 | 117 |
116 // static | 118 // static |
117 void SSLManager::OnSSLCertificateError( | 119 void SSLManager::OnSSLCertificateError( |
118 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, | 120 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, |
119 const ResourceType resource_type, | 121 const ResourceType resource_type, |
120 const GURL& url, | 122 const GURL& url, |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 SSLManagerSet* managers = | 421 SSLManagerSet* managers = |
420 static_cast<SSLManagerSet*>(context->GetUserData(kSSLManagerKeyName)); | 422 static_cast<SSLManagerSet*>(context->GetUserData(kSSLManagerKeyName)); |
421 | 423 |
422 for (std::set<SSLManager*>::iterator i = managers->get().begin(); | 424 for (std::set<SSLManager*>::iterator i = managers->get().begin(); |
423 i != managers->get().end(); ++i) { | 425 i != managers->get().end(); ++i) { |
424 (*i)->UpdateEntry((*i)->controller()->GetLastCommittedEntry(), 0, 0); | 426 (*i)->UpdateEntry((*i)->controller()->GetLastCommittedEntry(), 0, 0); |
425 } | 427 } |
426 } | 428 } |
427 | 429 |
428 } // namespace content | 430 } // namespace content |
OLD | NEW |