OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/utility/media_galleries/pmp_column_reader.h" | 5 #include "chrome/utility/media_galleries/pmp_column_reader.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 | 8 |
9 #include "base/file_util.h" | |
10 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/files/file_util.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
13 | 13 |
14 namespace picasa { | 14 namespace picasa { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 COMPILE_ASSERT(sizeof(double) == 8, double_must_be_8_bytes_long); | 18 COMPILE_ASSERT(sizeof(double) == 8, double_must_be_8_bytes_long); |
19 const int64 kPmpMaxFilesize = 50*1024*1024; // Arbitrary maximum of 50 MB. | 19 const int64 kPmpMaxFilesize = 50*1024*1024; // Arbitrary maximum of 50 MB. |
20 | 20 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 strings_.push_back(reinterpret_cast<const char*>(data_cursor)); | 197 strings_.push_back(reinterpret_cast<const char*>(data_cursor)); |
198 data_cursor += length_in_bytes; | 198 data_cursor += length_in_bytes; |
199 bytes_parsed += length_in_bytes; | 199 bytes_parsed += length_in_bytes; |
200 } | 200 } |
201 | 201 |
202 return bytes_parsed - kPmpHeaderSize; | 202 return bytes_parsed - kPmpHeaderSize; |
203 } | 203 } |
204 | 204 |
205 } // namespace picasa | 205 } // namespace picasa |
OLD | NEW |