Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: content/browser/renderer_host/pepper/pepper_socket_utils.h

Issue 22923014: TCPSockets are switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "content/public/common/socket_permission_request.h" 8 #include "content/public/common/socket_permission_request.h"
9 #include "ppapi/c/pp_stdint.h"
9 10
10 struct PP_NetAddress_Private; 11 struct PP_NetAddress_Private;
11 12
13 namespace net {
14 class X509Certificate;
15 }
16
17 namespace ppapi {
18 class 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.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698