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

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

Issue 1109723002: Use of base::StringPairs appropriately in nacl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review comments. 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
« no previous file with comments | « no previous file | components/nacl/common/nacl_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_NACL_COMMON_NACL_TYPES_H_ 5 #ifndef COMPONENTS_NACL_COMMON_NACL_TYPES_H_
6 #define COMPONENTS_NACL_COMMON_NACL_TYPES_H_ 6 #define COMPONENTS_NACL_COMMON_NACL_TYPES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/shared_memory.h" 13 #include "base/memory/shared_memory.h"
14 #include "base/process/process_handle.h" 14 #include "base/process/process_handle.h"
15 #include "base/strings/string_split.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "ipc/ipc_channel.h" 17 #include "ipc/ipc_channel.h"
17 #include "ipc/ipc_platform_file.h" 18 #include "ipc/ipc_platform_file.h"
18 19
19 #if defined(OS_POSIX) 20 #if defined(OS_POSIX)
20 #include "base/file_descriptor_posix.h" 21 #include "base/file_descriptor_posix.h"
21 #endif 22 #endif
22 23
23 #if defined(OS_WIN) 24 #if defined(OS_WIN)
24 #include <windows.h> // for HANDLE 25 #include <windows.h> // for HANDLE
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // serialization in nacl_messages.h and (for POD fields) the constructor 105 // serialization in nacl_messages.h and (for POD fields) the constructor
105 // in nacl_types.cc. 106 // in nacl_types.cc.
106 }; 107 };
107 108
108 // Parameters sent to the browser process to have it launch a NaCl process. 109 // Parameters sent to the browser process to have it launch a NaCl process.
109 // 110 //
110 // If you change this, you will also need to update the IPC serialization in 111 // If you change this, you will also need to update the IPC serialization in
111 // nacl_host_messages.h. 112 // nacl_host_messages.h.
112 struct NaClLaunchParams { 113 struct NaClLaunchParams {
113 NaClLaunchParams(); 114 NaClLaunchParams();
114 NaClLaunchParams( 115 NaClLaunchParams(const std::string& manifest_url,
115 const std::string& manifest_url, 116 const IPC::PlatformFileForTransit& nexe_file,
116 const IPC::PlatformFileForTransit& nexe_file, 117 uint64_t nexe_token_lo,
117 uint64_t nexe_token_lo, 118 uint64_t nexe_token_hi,
118 uint64_t nexe_token_hi, 119 // A pair of a manifest key and its resource URL.
119 // A pair of a manifest key and its resource URL. 120 const base::StringPairs& resource_files_to_prefetch,
120 const std::vector< 121 int render_view_id,
121 std::pair<std::string, std::string> >& resource_files_to_prefetch, 122 uint32 permission_bits,
122 int render_view_id, 123 bool uses_nonsfi_mode,
123 uint32 permission_bits, 124 NaClAppProcessType process_type);
124 bool uses_nonsfi_mode,
125 NaClAppProcessType process_type);
126 ~NaClLaunchParams(); 125 ~NaClLaunchParams();
127 126
128 std::string manifest_url; 127 std::string manifest_url;
129 // On Windows, the HANDLE passed here is valid in the renderer's context. 128 // On Windows, the HANDLE passed here is valid in the renderer's context.
130 // It's the responsibility of the browser to duplicate this handle properly 129 // It's the responsibility of the browser to duplicate this handle properly
131 // for passing it to the plugin. 130 // for passing it to the plugin.
132 IPC::PlatformFileForTransit nexe_file; 131 IPC::PlatformFileForTransit nexe_file;
133 uint64_t nexe_token_lo; 132 uint64_t nexe_token_lo;
134 uint64_t nexe_token_hi; 133 uint64_t nexe_token_hi;
135 std::vector<std::pair<std::string, std::string> > resource_files_to_prefetch; 134 base::StringPairs resource_files_to_prefetch;
136 135
137 int render_view_id; 136 int render_view_id;
138 uint32 permission_bits; 137 uint32 permission_bits;
139 bool uses_nonsfi_mode; 138 bool uses_nonsfi_mode;
140 139
141 NaClAppProcessType process_type; 140 NaClAppProcessType process_type;
142 }; 141 };
143 142
144 struct NaClLaunchResult { 143 struct NaClLaunchResult {
145 NaClLaunchResult(); 144 NaClLaunchResult();
(...skipping 23 matching lines...) Expand all
169 base::ProcessId plugin_pid; 168 base::ProcessId plugin_pid;
170 int plugin_child_id; 169 int plugin_child_id;
171 170
172 // For NaCl <-> renderer crash information reporting. 171 // For NaCl <-> renderer crash information reporting.
173 base::SharedMemoryHandle crash_info_shmem_handle; 172 base::SharedMemoryHandle crash_info_shmem_handle;
174 }; 173 };
175 174
176 } // namespace nacl 175 } // namespace nacl
177 176
178 #endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_ 177 #endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | components/nacl/common/nacl_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698