OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "ppapi/proxy/serialized_handle.h" | 5 #include "ppapi/proxy/serialized_handle.h" |
6 | 6 |
7 #include "base/memory/shared_memory.h" | 7 #include "base/memory/shared_memory.h" |
8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 break; | 129 break; |
130 } | 130 } |
131 case FILE: { | 131 case FILE: { |
132 int open_flags = 0; | 132 int open_flags = 0; |
133 PP_Resource file_io = 0; | 133 PP_Resource file_io = 0; |
134 if (!iter->ReadInt(&open_flags) || !iter->ReadInt(&file_io)) | 134 if (!iter->ReadInt(&open_flags) || !iter->ReadInt(&file_io)) |
135 return false; | 135 return false; |
136 hdr->open_flags = open_flags; | 136 hdr->open_flags = open_flags; |
137 hdr->file_io = file_io; | 137 hdr->file_io = file_io; |
138 valid_type = true; | 138 valid_type = true; |
| 139 break; |
139 } | 140 } |
140 case SOCKET: | 141 case SOCKET: |
141 case CHANNEL_HANDLE: | 142 case CHANNEL_HANDLE: |
142 case INVALID: | 143 case INVALID: |
143 valid_type = true; | 144 valid_type = true; |
144 break; | 145 break; |
145 // No default so the compiler will warn us if a new type is added. | 146 // No default so the compiler will warn us if a new type is added. |
146 } | 147 } |
147 if (valid_type) | 148 if (valid_type) |
148 hdr->type = Type(type); | 149 hdr->type = Type(type); |
149 return valid_type; | 150 return valid_type; |
150 } | 151 } |
151 | 152 |
152 } // namespace proxy | 153 } // namespace proxy |
153 } // namespace ppapi | 154 } // namespace ppapi |
OLD | NEW |