OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ppapi_param_traits.h" | 5 #include "ppapi/proxy/ppapi_param_traits.h" |
6 | 6 |
7 #include <string.h> // For memcpy | 7 #include <string.h> // For memcpy |
8 | 8 |
9 #include "ppapi/c/pp_file_info.h" | 9 #include "ppapi/c/pp_file_info.h" |
10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 !ParamTraits<int>::Read(m, iter, &system_type) || | 117 !ParamTraits<int>::Read(m, iter, &system_type) || |
118 !ParamTraits<double>::Read(m, iter, &r->creation_time) || | 118 !ParamTraits<double>::Read(m, iter, &r->creation_time) || |
119 !ParamTraits<double>::Read(m, iter, &r->last_access_time) || | 119 !ParamTraits<double>::Read(m, iter, &r->last_access_time) || |
120 !ParamTraits<double>::Read(m, iter, &r->last_modified_time)) | 120 !ParamTraits<double>::Read(m, iter, &r->last_modified_time)) |
121 return false; | 121 return false; |
122 if (type != PP_FILETYPE_REGULAR && | 122 if (type != PP_FILETYPE_REGULAR && |
123 type != PP_FILETYPE_DIRECTORY && | 123 type != PP_FILETYPE_DIRECTORY && |
124 type != PP_FILETYPE_OTHER) | 124 type != PP_FILETYPE_OTHER) |
125 return false; | 125 return false; |
126 r->type = static_cast<PP_FileType>(type); | 126 r->type = static_cast<PP_FileType>(type); |
127 if (system_type != PP_FILESYSTEMTYPE_EXTERNAL && | 127 if (system_type != PP_FILESYSTEMTYPE_INVALID && |
| 128 system_type != PP_FILESYSTEMTYPE_EXTERNAL && |
128 system_type != PP_FILESYSTEMTYPE_LOCALPERSISTENT && | 129 system_type != PP_FILESYSTEMTYPE_LOCALPERSISTENT && |
129 system_type != PP_FILESYSTEMTYPE_LOCALTEMPORARY) | 130 system_type != PP_FILESYSTEMTYPE_LOCALTEMPORARY) |
130 return false; | 131 return false; |
131 r->system_type = static_cast<PP_FileSystemType>(system_type); | 132 r->system_type = static_cast<PP_FileSystemType>(system_type); |
132 return true; | 133 return true; |
133 } | 134 } |
134 | 135 |
135 // static | 136 // static |
136 void ParamTraits<PP_FileInfo>::Log(const param_type& p, std::string* l) { | 137 void ParamTraits<PP_FileInfo>::Log(const param_type& p, std::string* l) { |
137 } | 138 } |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 param_type* r) { | 476 param_type* r) { |
476 return r->ReadFromMessage(m, iter); | 477 return r->ReadFromMessage(m, iter); |
477 } | 478 } |
478 | 479 |
479 // static | 480 // static |
480 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Log(const param_type& p, | 481 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Log(const param_type& p, |
481 std::string* l) { | 482 std::string* l) { |
482 } | 483 } |
483 | 484 |
484 } // namespace IPC | 485 } // namespace IPC |
OLD | NEW |