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

Side by Side Diff: components/nacl/common/nacl_types.cc

Issue 1085583005: Refactor params of NaClProcessMsg_Start. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/nacl/common/nacl_types.h" 5 #include "components/nacl/common/nacl_types.h"
6 #include "ipc/ipc_platform_file.h" 6 #include "ipc/ipc_platform_file.h"
7 7
8 namespace nacl { 8 namespace nacl {
9 9
10 NaClStartParams::NaClStartParams() 10 NaClStartParams::NaClStartParams()
11 : nexe_file(IPC::InvalidPlatformFileForTransit()), 11 : nexe_file(IPC::InvalidPlatformFileForTransit()),
12 imc_bootstrap_handle(IPC::InvalidPlatformFileForTransit()),
13 irt_handle(IPC::InvalidPlatformFileForTransit()),
14 #if defined(OS_MACOSX)
15 mac_shm_fd(IPC::InvalidPlatformFileForTransit()),
16 #endif
17 #if defined(OS_POSIX)
18 debug_stub_server_bound_socket(IPC::InvalidPlatformFileForTransit()),
19 #endif
12 validation_cache_enabled(false), 20 validation_cache_enabled(false),
13 enable_debug_stub(false), 21 enable_debug_stub(false),
14 enable_ipc_proxy(false), 22 enable_ipc_proxy(false),
15 process_type(kUnknownNaClProcessType), 23 process_type(kUnknownNaClProcessType),
16 crash_info_shmem_handle(base::SharedMemory::NULLHandle()) { 24 crash_info_shmem_handle(base::SharedMemory::NULLHandle()) {
17 } 25 }
18 26
19 NaClStartParams::~NaClStartParams() { 27 NaClStartParams::~NaClStartParams() {
20 } 28 }
21 29
22 NaClResourceFileInfo::NaClResourceFileInfo() 30 NaClResourcePrefetchResult::NaClResourcePrefetchResult()
23 : file(IPC::InvalidPlatformFileForTransit()) { 31 : file(IPC::InvalidPlatformFileForTransit()) {
24 } 32 }
25 33
26 NaClResourceFileInfo::NaClResourceFileInfo( 34 NaClResourcePrefetchResult::NaClResourcePrefetchResult(
27 IPC::PlatformFileForTransit file, 35 IPC::PlatformFileForTransit file,
28 const base::FilePath& file_path_metadata, 36 const base::FilePath& file_path_metadata,
29 const std::string& file_key) 37 const std::string& file_key)
30 : file(file), file_path_metadata(file_path_metadata), file_key(file_key) { 38 : file(file), file_path_metadata(file_path_metadata), file_key(file_key) {
31 } 39 }
32 40
33 NaClResourceFileInfo::~NaClResourceFileInfo() { 41 NaClResourcePrefetchResult::~NaClResourcePrefetchResult() {
42 }
43
44 NaClResourcePrefetchRequest::NaClResourcePrefetchRequest() {
45 }
46
47 NaClResourcePrefetchRequest::NaClResourcePrefetchRequest(
48 const std::string& file_key,
49 const std::string& resource_url)
50 : file_key(file_key),
51 resource_url(resource_url) {
52 }
53
54 NaClResourcePrefetchRequest::~NaClResourcePrefetchRequest() {
34 } 55 }
35 56
36 NaClLaunchParams::NaClLaunchParams() 57 NaClLaunchParams::NaClLaunchParams()
37 : nexe_file(IPC::InvalidPlatformFileForTransit()), 58 : nexe_file(IPC::InvalidPlatformFileForTransit()),
38 nexe_token_lo(0), 59 nexe_token_lo(0),
39 nexe_token_hi(0), 60 nexe_token_hi(0),
40 render_view_id(0), 61 render_view_id(0),
41 permission_bits(0), 62 permission_bits(0),
42 process_type(kUnknownNaClProcessType) { 63 process_type(kUnknownNaClProcessType) {
43 } 64 }
44 65
45 NaClLaunchParams::NaClLaunchParams( 66 NaClLaunchParams::NaClLaunchParams(
46 const std::string& manifest_url, 67 const std::string& manifest_url,
47 const IPC::PlatformFileForTransit& nexe_file, 68 const IPC::PlatformFileForTransit& nexe_file,
48 uint64_t nexe_token_lo, 69 uint64_t nexe_token_lo,
49 uint64_t nexe_token_hi, 70 uint64_t nexe_token_hi,
50 const base::StringPairs& resource_files_to_prefetch, 71 const std::vector<
72 NaClResourcePrefetchRequest>& resource_prefetch_request_list,
51 int render_view_id, 73 int render_view_id,
52 uint32 permission_bits, 74 uint32 permission_bits,
53 bool uses_nonsfi_mode, 75 bool uses_nonsfi_mode,
54 NaClAppProcessType process_type) 76 NaClAppProcessType process_type)
55 : manifest_url(manifest_url), 77 : manifest_url(manifest_url),
56 nexe_file(nexe_file), 78 nexe_file(nexe_file),
57 nexe_token_lo(nexe_token_lo), 79 nexe_token_lo(nexe_token_lo),
58 nexe_token_hi(nexe_token_hi), 80 nexe_token_hi(nexe_token_hi),
59 resource_files_to_prefetch(resource_files_to_prefetch), 81 resource_prefetch_request_list(resource_prefetch_request_list),
60 render_view_id(render_view_id), 82 render_view_id(render_view_id),
61 permission_bits(permission_bits), 83 permission_bits(permission_bits),
62 uses_nonsfi_mode(uses_nonsfi_mode), 84 uses_nonsfi_mode(uses_nonsfi_mode),
63 process_type(process_type) { 85 process_type(process_type) {
64 } 86 }
65 87
66 NaClLaunchParams::~NaClLaunchParams() { 88 NaClLaunchParams::~NaClLaunchParams() {
67 } 89 }
68 90
69 NaClLaunchResult::NaClLaunchResult() 91 NaClLaunchResult::NaClLaunchResult()
(...skipping 19 matching lines...) Expand all
89 manifest_service_ipc_channel_handle(manifest_service_ipc_channel_handle), 111 manifest_service_ipc_channel_handle(manifest_service_ipc_channel_handle),
90 plugin_pid(plugin_pid), 112 plugin_pid(plugin_pid),
91 plugin_child_id(plugin_child_id), 113 plugin_child_id(plugin_child_id),
92 crash_info_shmem_handle(crash_info_shmem_handle) { 114 crash_info_shmem_handle(crash_info_shmem_handle) {
93 } 115 }
94 116
95 NaClLaunchResult::~NaClLaunchResult() { 117 NaClLaunchResult::~NaClLaunchResult() {
96 } 118 }
97 119
98 } // namespace nacl 120 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698