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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TEST_HELPER_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TEST_HELPER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TEST_HELPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 base::FilePath GetTempDirPath(); | 29 base::FilePath GetTempDirPath(); |
30 | 30 |
31 template<class T> | 31 template<class T> |
32 bool WriteColumnFileFromVector(const std::string& column_name, | 32 bool WriteColumnFileFromVector(const std::string& column_name, |
33 const PmpFieldType field_type, | 33 const PmpFieldType field_type, |
34 const std::vector<T>& elements_vector); | 34 const std::vector<T>& elements_vector); |
35 | 35 |
36 bool InitColumnReaderFromBytes(PmpColumnReader* const reader, | 36 bool InitColumnReaderFromBytes(PmpColumnReader* const reader, |
37 const std::vector<uint8>& data, | 37 const std::vector<uint8>& data, |
38 const PmpFieldType expected_type, | 38 const PmpFieldType expected_type); |
39 uint32* rows_read); | |
40 | 39 |
41 static std::vector<uint8> MakeHeader(const PmpFieldType field_type, | 40 static std::vector<uint8> MakeHeader(const PmpFieldType field_type, |
42 const uint32 row_count); | 41 const uint32 row_count); |
43 | 42 |
44 template<class T> | 43 template<class T> |
45 static std::vector<uint8> MakeHeaderAndBody(const PmpFieldType field_type, | 44 static std::vector<uint8> MakeHeaderAndBody(const PmpFieldType field_type, |
46 const uint32 row_count, | 45 const uint32 row_count, |
47 const std::vector<T>& elems); | 46 const std::vector<T>& elems); |
48 | 47 |
49 private: | 48 private: |
50 std::string table_name_; | 49 std::string table_name_; |
51 base::ScopedTempDir temp_dir_; | 50 base::ScopedTempDir temp_dir_; |
52 }; | 51 }; |
53 | 52 |
54 } // namespace picasa | 53 } // namespace picasa |
55 | 54 |
56 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TEST_HELPER_H_ | 55 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TEST_HELPER_H_ |
OLD | NEW |