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/files/file.h" | 7 #include "base/files/file.h" |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 break; | 120 break; |
121 } | 121 } |
122 case FILE: { | 122 case FILE: { |
123 int open_flags = 0; | 123 int open_flags = 0; |
124 PP_Resource file_io = 0; | 124 PP_Resource file_io = 0; |
125 if (!iter->ReadInt(&open_flags) || !iter->ReadInt(&file_io)) | 125 if (!iter->ReadInt(&open_flags) || !iter->ReadInt(&file_io)) |
126 return false; | 126 return false; |
127 hdr->open_flags = open_flags; | 127 hdr->open_flags = open_flags; |
128 hdr->file_io = file_io; | 128 hdr->file_io = file_io; |
129 valid_type = true; | 129 valid_type = true; |
| 130 break; |
130 } | 131 } |
131 case SOCKET: | 132 case SOCKET: |
132 case INVALID: | 133 case INVALID: |
133 valid_type = true; | 134 valid_type = true; |
134 break; | 135 break; |
135 // No default so the compiler will warn us if a new type is added. | 136 // No default so the compiler will warn us if a new type is added. |
136 } | 137 } |
137 if (valid_type) | 138 if (valid_type) |
138 hdr->type = Type(type); | 139 hdr->type = Type(type); |
139 return valid_type; | 140 return valid_type; |
140 } | 141 } |
141 | 142 |
142 } // namespace proxy | 143 } // namespace proxy |
143 } // namespace ppapi | 144 } // namespace ppapi |
OLD | NEW |