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

Side by Side Diff: components/nacl/loader/nacl_ipc_adapter.h

Issue 472073003: Pepper: Make pending_sync_msgs_ local to IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | components/nacl/loader/nacl_ipc_adapter.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 CHROME_NACL_NACL_IPC_ADAPTER_H_ 5 #ifndef CHROME_NACL_NACL_IPC_ADAPTER_H_
6 #define CHROME_NACL_NACL_IPC_ADAPTER_H_ 6 #define CHROME_NACL_NACL_IPC_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 bool channel_closed_; 141 bool channel_closed_;
142 }; 142 };
143 143
144 // This is the data that must only be accessed on the I/O thread (as defined 144 // This is the data that must only be accessed on the I/O thread (as defined
145 // by TaskRunner). This struct just separates it so it's easier to see. 145 // by TaskRunner). This struct just separates it so it's easier to see.
146 struct IOThreadData { 146 struct IOThreadData {
147 IOThreadData(); 147 IOThreadData();
148 ~IOThreadData(); 148 ~IOThreadData();
149 149
150 scoped_ptr<IPC::Channel> channel_; 150 scoped_ptr<IPC::Channel> channel_;
151
152 // When we send a synchronous message (from untrusted to trusted), we store
153 // its type here, so that later we can associate the reply with its type
154 // for scanning.
155 typedef std::map<int, uint32> PendingSyncMsgMap;
156 PendingSyncMsgMap pending_sync_msgs_;
151 }; 157 };
152 158
153 virtual ~NaClIPCAdapter(); 159 virtual ~NaClIPCAdapter();
154 160
155 // Returns 0 if nothing is waiting. 161 // Returns 0 if nothing is waiting.
156 int LockedReceive(NaClImcTypedMsgHdr* msg); 162 int LockedReceive(NaClImcTypedMsgHdr* msg);
157 163
158 // Sends a message that we know has been completed to the Chrome process. 164 // Sends a message that we know has been completed to the Chrome process.
159 bool SendCompleteMessage(const char* buffer, size_t buffer_len); 165 bool SendCompleteMessage(const char* buffer, size_t buffer_len);
160 166
(...skipping 22 matching lines...) Expand all
183 // To be accessed on the I/O thread (via task runner) only. 189 // To be accessed on the I/O thread (via task runner) only.
184 IOThreadData io_thread_data_; 190 IOThreadData io_thread_data_;
185 191
186 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter); 192 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter);
187 }; 193 };
188 194
189 // Export TranslatePepperFileReadWriteOpenFlags for testing. 195 // Export TranslatePepperFileReadWriteOpenFlags for testing.
190 int TranslatePepperFileReadWriteOpenFlagsForTesting(int32_t pp_open_flags); 196 int TranslatePepperFileReadWriteOpenFlagsForTesting(int32_t pp_open_flags);
191 197
192 #endif // CHROME_NACL_NACL_IPC_ADAPTER_H_ 198 #endif // CHROME_NACL_NACL_IPC_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | components/nacl/loader/nacl_ipc_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698