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

Unified Diff: ppapi/proxy/nacl_message_scanner.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/loader/nacl_ipc_adapter.cc ('k') | ppapi/proxy/nacl_message_scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/nacl_message_scanner.h
diff --git a/ppapi/proxy/nacl_message_scanner.h b/ppapi/proxy/nacl_message_scanner.h
index d1360b72519730b4a45850fc86d9db24d9c2e202..6a039239cf4a3131b66cf39ba4ad18296d80f591 100644
--- a/ppapi/proxy/nacl_message_scanner.h
+++ b/ppapi/proxy/nacl_message_scanner.h
@@ -34,11 +34,16 @@ class PPAPI_PROXY_EXPORT NaClMessageScanner {
// are found, |handles| is left unchanged. If no rewriting is needed,
// |new_msg_ptr| is left unchanged.
//
+ // For normal messages, |type| is equivalent to |msg|.id(), but, if |msg| is
+ // a reply to a synchronous message, |type| is the id of the original
+ // message.
+ //
// See more explanation in the method definition.
//
// See chrome/nacl/nacl_ipc_adapter.cc for where this is used to help convert
// native handles to NaClDescs.
bool ScanMessage(const IPC::Message& msg,
+ uint32_t type,
std::vector<SerializedHandle>* handles,
scoped_ptr<IPC::Message>* new_msg_ptr);
@@ -99,18 +104,10 @@ class PPAPI_PROXY_EXPORT NaClMessageScanner {
private:
friend class NaClMessageScannerTest;
-
- void RegisterSyncMessageForReply(const IPC::Message& msg);
void AuditNestedMessage(PP_Resource resource,
const IPC::Message& msg,
SerializedHandle* handle);
- // When we send a synchronous message (from untrusted to trusted), we store
- // its type here, so that later we can associate the reply with its type
- // for scanning.
- typedef std::map<int, uint32> PendingSyncMsgMap;
- PendingSyncMsgMap pending_sync_msgs_;
-
// We intercept FileSystem and FileIO messages to maintain information about
// file systems and open files. This is used by NaClQuotaDescs to calculate
// quota consumption and check it against the reserved amount.
« no previous file with comments | « components/nacl/loader/nacl_ipc_adapter.cc ('k') | ppapi/proxy/nacl_message_scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698