| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_error_handler.h" | 5 #include "content/browser/ssl/ssl_error_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/browser/renderer_host/render_view_host.h" | 8 #include "content/browser/renderer_host/render_view_host.h" |
| 9 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 9 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 10 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 10 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 SSLCertErrorHandler* SSLErrorHandler::AsSSLCertErrorHandler() { | 60 SSLCertErrorHandler* SSLErrorHandler::AsSSLCertErrorHandler() { |
| 61 return NULL; | 61 return NULL; |
| 62 } | 62 } |
| 63 | 63 |
| 64 void SSLErrorHandler::Dispatch() { | 64 void SSLErrorHandler::Dispatch() { |
| 65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 66 | 66 |
| 67 WebContents* web_contents = NULL; | 67 WebContents* web_contents = NULL; |
| 68 RenderViewHost* render_view_host = | 68 RenderViewHostImpl* render_view_host = |
| 69 RenderViewHost::FromID(render_process_id_, render_view_id_); | 69 RenderViewHostImpl::FromID(render_process_id_, render_view_id_); |
| 70 if (render_view_host) | 70 if (render_view_host) |
| 71 web_contents = render_view_host->delegate()->GetAsWebContents(); | 71 web_contents = render_view_host->GetDelegate()->GetAsWebContents(); |
| 72 | 72 |
| 73 if (!web_contents) { | 73 if (!web_contents) { |
| 74 // We arrived on the UI thread, but the tab we're looking for is no longer | 74 // We arrived on the UI thread, but the tab we're looking for is no longer |
| 75 // here. | 75 // here. |
| 76 OnDispatchFailed(); | 76 OnDispatchFailed(); |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 | 79 |
| 80 // Hand ourselves off to the SSLManager. | 80 // Hand ourselves off to the SSLManager. |
| 81 manager_ = | 81 manager_ = |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // already have been deleted. | 183 // already have been deleted. |
| 184 DCHECK(!request_has_been_notified_); | 184 DCHECK(!request_has_been_notified_); |
| 185 if (request_has_been_notified_) | 185 if (request_has_been_notified_) |
| 186 return; | 186 return; |
| 187 | 187 |
| 188 request_has_been_notified_ = true; | 188 request_has_been_notified_ = true; |
| 189 | 189 |
| 190 // We're done with this object on the IO thread. | 190 // We're done with this object on the IO thread. |
| 191 Release(); | 191 Release(); |
| 192 } | 192 } |
| OLD | NEW |