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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | |
| 8 #include "content/public/common/socket_permission_request.h" | 9 #include "content/public/common/socket_permission_request.h" |
| 9 | 10 |
| 10 struct PP_NetAddress_Private; | 11 struct PP_NetAddress_Private; |
| 11 | 12 |
| 13 namespace net { | |
| 14 class X509Certificate; | |
|
yzshen1
2013/08/16 20:40:42
extra space.
ygorshenin1
2013/08/19 14:33:35
Done.
| |
| 15 } | |
| 16 | |
| 17 namespace ppapi { | |
| 18 struct PPB_X509Certificate_Fields; | |
| 19 } | |
| 20 | |
| 12 namespace content { | 21 namespace content { |
| 13 | 22 |
| 14 class RenderViewHost; | 23 class RenderViewHost; |
| 15 | 24 |
| 16 namespace pepper_socket_utils { | 25 namespace pepper_socket_utils { |
| 17 | 26 |
| 18 SocketPermissionRequest CreateSocketPermissionRequest( | 27 SocketPermissionRequest CreateSocketPermissionRequest( |
| 19 SocketPermissionRequest::OperationType type, | 28 SocketPermissionRequest::OperationType type, |
| 20 const PP_NetAddress_Private& net_addr); | 29 const PP_NetAddress_Private& net_addr); |
| 21 | 30 |
| 22 bool CanUseSocketAPIs(bool external_plugin, | 31 bool CanUseSocketAPIs(bool external_plugin, |
| 23 bool private_api, | 32 bool private_api, |
| 24 const SocketPermissionRequest& params, | 33 const SocketPermissionRequest& params, |
| 25 int render_process_id, | 34 int render_process_id, |
| 26 int render_view_id); | 35 int render_view_id); |
| 27 | 36 |
| 28 // TODO (ygorshenin@): remove this method. | 37 // TODO (ygorshenin@): remove this method. |
| 29 bool CanUseSocketAPIs(bool external_plugin, | 38 bool CanUseSocketAPIs(bool external_plugin, |
| 30 bool private_api, | 39 bool private_api, |
| 31 const SocketPermissionRequest& params, | 40 const SocketPermissionRequest& params, |
| 32 RenderViewHost* render_view_host); | 41 RenderViewHost* render_view_host); |
| 33 | 42 |
| 43 // Extracts the certificate field data from a |net::X509Certificate| into | |
| 44 // |PPB_X509Certificate_Fields|. | |
|
yzshen1
2013/08/16 20:40:42
nit: we usually don't use | around type names.
ygorshenin1
2013/08/19 14:33:35
Done.
| |
| 45 bool GetCertificateFields(const net::X509Certificate& cert, | |
| 46 ppapi::PPB_X509Certificate_Fields* fields); | |
| 47 | |
| 48 // Extracts the certificate field data from the DER representation of a | |
| 49 // certificate into |PPB_X509Certificate_Fields|. | |
| 50 bool GetCertificateFields(const char* der, | |
| 51 uint32_t length, | |
| 52 ppapi::PPB_X509Certificate_Fields* fields); | |
| 53 | |
| 34 } // namespace pepper_socket_utils | 54 } // namespace pepper_socket_utils |
| 35 | 55 |
| 36 } // namespace content | 56 } // namespace content |
| 37 | 57 |
| 38 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ | 58 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
| OLD | NEW |