| 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_COMMON_MEDIA_GALLERIES_PMP_TEST_UTIL_H_ | 5 #ifndef CHROME_COMMON_MEDIA_GALLERIES_PMP_TEST_UTIL_H_ |
| 6 #define CHROME_COMMON_MEDIA_GALLERIES_PMP_TEST_UTIL_H_ | 6 #define CHROME_COMMON_MEDIA_GALLERIES_PMP_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 13 #include "base/files/scoped_temp_dir.h" | 14 #include "base/files/scoped_temp_dir.h" |
| 14 #include "chrome/common/media_galleries/pmp_constants.h" | 15 #include "chrome/common/media_galleries/pmp_constants.h" |
| 15 | 16 |
| 16 namespace picasa { | 17 namespace picasa { |
| 17 | 18 |
| 18 namespace PmpTestUtil { | 19 namespace PmpTestUtil { |
| 19 | 20 |
| 20 bool WriteIndicatorFile( | 21 bool WriteIndicatorFile( |
| 21 const base::FilePath& column_file_destination, | 22 const base::FilePath& column_file_destination, |
| 22 const std::string& table_name); | 23 const std::string& table_name); |
| 23 | 24 |
| 24 template<class T> | 25 template<class T> |
| 25 bool WriteColumnFileFromVector( | 26 bool WriteColumnFileFromVector( |
| 26 const base::FilePath& column_file_destination, | 27 const base::FilePath& column_file_destination, |
| 27 const std::string& table_name, | 28 const std::string& table_name, |
| 28 const std::string& column_name, | 29 const std::string& column_name, |
| 29 const PmpFieldType field_type, | 30 const PmpFieldType field_type, |
| 30 const std::vector<T>& elements_vector); | 31 const std::vector<T>& elements_vector); |
| 31 | 32 |
| 32 std::vector<char> MakeHeader(const PmpFieldType field_type, | 33 std::vector<char> MakeHeader(const PmpFieldType field_type, |
| 33 const uint32 row_count); | 34 const uint32_t row_count); |
| 34 | 35 |
| 35 template<class T> | 36 template <class T> |
| 36 std::vector<char> MakeHeaderAndBody(const PmpFieldType field_type, | 37 std::vector<char> MakeHeaderAndBody(const PmpFieldType field_type, |
| 37 const uint32 row_count, | 38 const uint32_t row_count, |
| 38 const std::vector<T>& elems); | 39 const std::vector<T>& elems); |
| 39 | 40 |
| 40 } // namespace PmpTestUtil | 41 } // namespace PmpTestUtil |
| 41 | 42 |
| 42 } // namespace picasa | 43 } // namespace picasa |
| 43 | 44 |
| 44 #endif // CHROME_COMMON_MEDIA_GALLERIES_PMP_TEST_UTIL_H_ | 45 #endif // CHROME_COMMON_MEDIA_GALLERIES_PMP_TEST_UTIL_H_ |
| OLD | NEW |