summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/serialized_structs.cc
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-06 19:32:42 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-06 19:32:42 +0000
commit8b73c2e491f6c5d38047963d01b47bb071a96e18 (patch)
treef961ce5d2d358bbda8b41f8c6824d4af5bb2c6b2 /ppapi/proxy/serialized_structs.cc
parent1300e92e24e90d850e8b12129c1944569a9e9ce8 (diff)
downloadchromium_src-8b73c2e491f6c5d38047963d01b47bb071a96e18.zip
chromium_src-8b73c2e491f6c5d38047963d01b47bb071a96e18.tar.gz
chromium_src-8b73c2e491f6c5d38047963d01b47bb071a96e18.tar.bz2
Revert 171408
> The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal. > > Review URL: https://codereview.chromium.org/11359097 TBR=raymes@chromium.org Review URL: https://codereview.chromium.org/11437038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/serialized_structs.cc')
-rw-r--r--ppapi/proxy/serialized_structs.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/ppapi/proxy/serialized_structs.cc b/ppapi/proxy/serialized_structs.cc
index 2ddf325..f83ae0b 100644
--- a/ppapi/proxy/serialized_structs.cc
+++ b/ppapi/proxy/serialized_structs.cc
@@ -107,17 +107,10 @@ SerializedHandle::SerializedHandle(
}
bool SerializedHandle::IsHandleValid() const {
- switch (type_) {
- case SHARED_MEMORY:
- return base::SharedMemory::IsHandleValid(shm_handle_);
- case SOCKET:
- case CHANNEL_HANDLE:
- case FILE:
- return !(IPC::InvalidPlatformFileForTransit() == descriptor_);
- case INVALID:
- return false;
- // No default so the compiler will warn us if a new type is added.
- }
+ if (type_ == SHARED_MEMORY)
+ return base::SharedMemory::IsHandleValid(shm_handle_);
+ else if (type_ == SOCKET || type_ == CHANNEL_HANDLE)
+ return !(IPC::InvalidPlatformFileForTransit() == descriptor_);
return false;
}
@@ -132,7 +125,6 @@ void SerializedHandle::Close() {
break;
case SOCKET:
case CHANNEL_HANDLE:
- case FILE:
base::PlatformFile file =
IPC::PlatformFileForTransitToPlatformFile(descriptor_);
#if !defined(OS_NACL)
@@ -176,7 +168,6 @@ bool SerializedHandle::ReadHeader(PickleIterator* iter, Header* hdr) {
}
case SOCKET:
case CHANNEL_HANDLE:
- case FILE:
case INVALID:
valid_type = true;
break;