Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "webkit/plugins/ppapi/ppb_flash_x509_certificate_impl.h" | |
| 6 | |
| 7 #include "webkit/plugins/ppapi/plugin_delegate.h" | |
| 8 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | |
| 9 #include "webkit/plugins/ppapi/resource_helper.h" | |
| 10 | |
| 11 namespace webkit { | |
| 12 namespace ppapi { | |
| 13 | |
| 14 // static | |
| 15 PP_Resource PPB_Flash_X509Certificate_Impl::CreateResource( | |
| 16 PP_Instance instance) { | |
| 17 return (new PPB_Flash_X509Certificate_Impl( | |
| 18 ::ppapi::OBJECT_IS_IMPL, instance))->GetReference(); | |
| 19 } | |
| 20 | |
| 21 PPB_Flash_X509Certificate_Impl::PPB_Flash_X509Certificate_Impl( | |
| 22 ::ppapi::ResourceObjectType type, PP_Instance instance) : | |
| 23 PPB_Flash_X509Certificate_Shared(type, instance) { | |
| 24 } | |
| 25 | |
| 26 bool PPB_Flash_X509Certificate_Impl::ParseDER(const std::vector<char>& der, | |
| 27 ::ppapi::PPB_X509Certificate_Fields* result) { | |
|
yzshen1
2012/03/22 23:32:40
Wrong indent.
raymes
2012/03/26 16:05:57
Done.
| |
| 28 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); | |
| 29 if (!plugin_delegate) { | |
|
yzshen1
2012/03/22 23:32:40
{} is not necessary.
raymes
2012/03/26 16:05:57
Done.
| |
| 30 return false; | |
| 31 } | |
| 32 | |
| 33 return plugin_delegate->X509CertificateParseDER(der, result); | |
| 34 } | |
| 35 | |
| 36 PPB_Flash_X509Certificate_Impl::~PPB_Flash_X509Certificate_Impl() { | |
| 37 } | |
| 38 | |
| 39 } // namespace ppapi | |
| 40 } // namespace webkit | |
| OLD | NEW |