Chromium Code Reviews| Index: android_webview/native/aw_certificate_error_handler_base.cc |
| diff --git a/android_webview/native/aw_certificate_error_handler_base.cc b/android_webview/native/aw_certificate_error_handler_base.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3904d8d0af8eee9e2fb5821afc95cac39aae2a33 |
| --- /dev/null |
| +++ b/android_webview/native/aw_certificate_error_handler_base.cc |
| @@ -0,0 +1,29 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "android_webview/browser/aw_certificate_error_handler_base.h" |
| + |
| +#include "android_webview/native/aw_contents.h" |
| +#include "content/public/browser/render_view_host.h" |
| +#include "content/public/browser/web_contents.h" |
| + |
| +namespace android_webview { |
| + |
| +AwCertificateErrorHandlerBase::~AwCertificateErrorHandlerBase() { |
| +} |
| + |
| +//static |
| +AwCertificateErrorHandlerBase* AwCertificateErrorHandlerBase::FromID( |
| + int render_process_id, |
| + int render_view_id) { |
| + |
| + const content::RenderViewHost* host = |
|
boliu
2013/02/01 20:03:23
DCHECK every step of the way for null values.
Kristian Monsen
2013/02/01 20:51:12
Just curious, what does that really add? It will c
boliu
2013/02/01 20:56:59
Benefit is that (especially with the crazy optimiz
sgurun-gerrit only
2013/02/01 22:08:00
Done.
|
| + content::RenderViewHost::FromID(render_process_id, render_view_id); |
| + content::WebContents* web_contents = |
| + content::WebContents::FromRenderViewHost(host); |
| + return static_cast<AwCertificateErrorHandlerBase*> |
| + (AwContents::FromWebContents(web_contents)); |
| +} |
| + |
| +} // namespace android_webview |