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

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: Created 5 years, 8 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 mac_shm_fd(IPC::InvalidPlatformFileForTransit()),
15 debug_stub_server_bound_socket(IPC::InvalidPlatformFileForTransit()),
12 validation_cache_enabled(false), 16 validation_cache_enabled(false),
13 enable_debug_stub(false), 17 enable_debug_stub(false),
14 enable_ipc_proxy(false), 18 enable_ipc_proxy(false),
15 enable_mojo(false), 19 enable_mojo(false),
16 process_type(kUnknownNaClProcessType), 20 process_type(kUnknownNaClProcessType),
17 crash_info_shmem_handle(base::SharedMemory::NULLHandle()) { 21 crash_info_shmem_handle(base::SharedMemory::NULLHandle()) {
18 } 22 }
19 23
20 NaClStartParams::~NaClStartParams() { 24 NaClStartParams::~NaClStartParams() {
21 } 25 }
22 26
23 NaClResourceFileInfo::NaClResourceFileInfo() 27 NaClResourcePrefetchResult::NaClResourcePrefetchResult()
24 : file(IPC::InvalidPlatformFileForTransit()) { 28 : file(IPC::InvalidPlatformFileForTransit()) {
25 } 29 }
26 30
27 NaClResourceFileInfo::NaClResourceFileInfo( 31 NaClResourcePrefetchResult::NaClResourcePrefetchResult(
28 IPC::PlatformFileForTransit file, 32 IPC::PlatformFileForTransit file,
29 const base::FilePath& file_path_metadata, 33 const base::FilePath& file_path_metadata,
30 const std::string& file_key) 34 const std::string& file_key)
31 : file(file), file_path_metadata(file_path_metadata), file_key(file_key) { 35 : file(file), file_path_metadata(file_path_metadata), file_key(file_key) {
32 } 36 }
33 37
34 NaClResourceFileInfo::~NaClResourceFileInfo() { 38 NaClResourcePrefetchResult::~NaClResourcePrefetchResult() {
39 }
40
41 NaClResourcePrefetchRequest::NaClResourcePrefetchRequest() {
42 }
43
44 NaClResourcePrefetchRequest::NaClResourcePrefetchRequest(
45 const std::string& file_key,
46 const std::string& resource_url)
47 : file_key(file_key),
48 resource_url(resource_url) {
49 }
50
51 NaClResourcePrefetchRequest::~NaClResourcePrefetchRequest() {
35 } 52 }
36 53
37 NaClLaunchParams::NaClLaunchParams() 54 NaClLaunchParams::NaClLaunchParams()
38 : nexe_file(IPC::InvalidPlatformFileForTransit()), 55 : nexe_file(IPC::InvalidPlatformFileForTransit()),
39 nexe_token_lo(0), 56 nexe_token_lo(0),
40 nexe_token_hi(0), 57 nexe_token_hi(0),
41 render_view_id(0), 58 render_view_id(0),
42 permission_bits(0), 59 permission_bits(0),
43 process_type(kUnknownNaClProcessType) { 60 process_type(kUnknownNaClProcessType) {
44 } 61 }
45 62
46 NaClLaunchParams::NaClLaunchParams( 63 NaClLaunchParams::NaClLaunchParams(
47 const std::string& manifest_url, 64 const std::string& manifest_url,
48 const IPC::PlatformFileForTransit& nexe_file, 65 const IPC::PlatformFileForTransit& nexe_file,
49 uint64_t nexe_token_lo, 66 uint64_t nexe_token_lo,
50 uint64_t nexe_token_hi, 67 uint64_t nexe_token_hi,
51 const std::vector< 68 const std::vector<
52 std::pair<std::string, std::string> >& resource_files_to_prefetch, 69 NaClResourcePrefetchRequest>& resource_prefetch_request_list,
53 int render_view_id, 70 int render_view_id,
54 uint32 permission_bits, 71 uint32 permission_bits,
55 bool uses_nonsfi_mode, 72 bool uses_nonsfi_mode,
56 NaClAppProcessType process_type) 73 NaClAppProcessType process_type)
57 : manifest_url(manifest_url), 74 : manifest_url(manifest_url),
58 nexe_file(nexe_file), 75 nexe_file(nexe_file),
59 nexe_token_lo(nexe_token_lo), 76 nexe_token_lo(nexe_token_lo),
60 nexe_token_hi(nexe_token_hi), 77 nexe_token_hi(nexe_token_hi),
61 resource_files_to_prefetch(resource_files_to_prefetch), 78 resource_prefetch_request_list(resource_prefetch_request_list),
62 render_view_id(render_view_id), 79 render_view_id(render_view_id),
63 permission_bits(permission_bits), 80 permission_bits(permission_bits),
64 uses_nonsfi_mode(uses_nonsfi_mode), 81 uses_nonsfi_mode(uses_nonsfi_mode),
65 process_type(process_type) { 82 process_type(process_type) {
66 } 83 }
67 84
68 NaClLaunchParams::~NaClLaunchParams() { 85 NaClLaunchParams::~NaClLaunchParams() {
69 } 86 }
70 87
71 NaClLaunchResult::NaClLaunchResult() 88 NaClLaunchResult::NaClLaunchResult()
(...skipping 19 matching lines...) Expand all
91 manifest_service_ipc_channel_handle(manifest_service_ipc_channel_handle), 108 manifest_service_ipc_channel_handle(manifest_service_ipc_channel_handle),
92 plugin_pid(plugin_pid), 109 plugin_pid(plugin_pid),
93 plugin_child_id(plugin_child_id), 110 plugin_child_id(plugin_child_id),
94 crash_info_shmem_handle(crash_info_shmem_handle) { 111 crash_info_shmem_handle(crash_info_shmem_handle) {
95 } 112 }
96 113
97 NaClLaunchResult::~NaClLaunchResult() { 114 NaClLaunchResult::~NaClLaunchResult() {
98 } 115 }
99 116
100 } // namespace nacl 117 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698