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_INVALID && | 127 if (system_type != PP_FILESYSTEMTYPE_EXTERNAL && |
128 system_type != PP_FILESYSTEMTYPE_EXTERNAL && | |
129 system_type != PP_FILESYSTEMTYPE_LOCALPERSISTENT && | 128 system_type != PP_FILESYSTEMTYPE_LOCALPERSISTENT && |
130 system_type != PP_FILESYSTEMTYPE_LOCALTEMPORARY) | 129 system_type != PP_FILESYSTEMTYPE_LOCALTEMPORARY) |
131 return false; | 130 return false; |
132 r->system_type = static_cast<PP_FileSystemType>(system_type); | 131 r->system_type = static_cast<PP_FileSystemType>(system_type); |
133 return true; | 132 return true; |
134 } | 133 } |
135 | 134 |
136 // static | 135 // static |
137 void ParamTraits<PP_FileInfo>::Log(const param_type& p, std::string* l) { | 136 void ParamTraits<PP_FileInfo>::Log(const param_type& p, std::string* l) { |
138 } | 137 } |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 param_type* r) { | 475 param_type* r) { |
477 return r->ReadFromMessage(m, iter); | 476 return r->ReadFromMessage(m, iter); |
478 } | 477 } |
479 | 478 |
480 // static | 479 // static |
481 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Log(const param_type& p, | 480 void ParamTraits<ppapi::proxy::SerializedFlashMenu>::Log(const param_type& p, |
482 std::string* l) { | 481 std::string* l) { |
483 } | 482 } |
484 | 483 |
485 } // namespace IPC | 484 } // namespace IPC |
OLD | NEW |