| OLD | NEW |
| 1 // Copyright 2014 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2014 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 "fake_lib_archive.h" | 5 #include "fake_lib_archive.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "archive_entry.h" | 10 #include "archive_entry.h" |
| 11 #include "ppapi/cpp/logging.h" | 11 #include "ppapi/cpp/logging.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 // Copy data content. | 207 // Copy data content. |
| 208 const char* source = | 208 const char* source = |
| 209 fake_lib_archive_config::archive_data + archive_object->data_offset; | 209 fake_lib_archive_config::archive_data + archive_object->data_offset; |
| 210 PP_DCHECK(archive_data_size >= archive_object->data_offset + read_bytes); | 210 PP_DCHECK(archive_data_size >= archive_object->data_offset + read_bytes); |
| 211 memcpy(buffer, source, read_bytes); | 211 memcpy(buffer, source, read_bytes); |
| 212 | 212 |
| 213 archive_object->data_offset += read_bytes; | 213 archive_object->data_offset += read_bytes; |
| 214 return read_bytes; | 214 return read_bytes; |
| 215 } | 215 } |
| OLD | NEW |