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

Unified Diff: ppapi/proxy/serialized_structs.cc

Issue 10912011: Change NaCl IPC PPAPI proxy startup to support a NaCl-Browser process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « ppapi/proxy/serialized_structs.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/serialized_structs.cc
===================================================================
--- ppapi/proxy/serialized_structs.cc (revision 154143)
+++ ppapi/proxy/serialized_structs.cc (working copy)
@@ -102,8 +102,9 @@
}
SerializedHandle::SerializedHandle(
+ Type type,
const IPC::PlatformFileForTransit& socket_descriptor)
- : type_(SOCKET),
+ : type_(type),
shm_handle_(base::SharedMemory::NULLHandle()),
size_(0),
descriptor_(socket_descriptor) {
@@ -112,8 +113,8 @@
bool SerializedHandle::IsHandleValid() const {
if (type_ == SHARED_MEMORY)
return base::SharedMemory::IsHandleValid(shm_handle_);
- else if (type_ == SOCKET)
- return (IPC::InvalidPlatformFileForTransit() == descriptor_);
+ else if (type_ == SOCKET || type_ == CHANNEL_HANDLE)
+ return !(IPC::InvalidPlatformFileForTransit() == descriptor_);
return false;
}
@@ -145,8 +146,7 @@
break;
}
case SOCKET:
- valid_type = true;
- break;
+ case CHANNEL_HANDLE:
case INVALID:
valid_type = true;
break;
« no previous file with comments | « ppapi/proxy/serialized_structs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698