Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Side by Side Diff: webkit/fileapi/media/picasa/pmp_test_helper.h

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TEST_HELPER_H_
6 #define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TEST_HELPER_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/files/scoped_temp_dir.h"
12 #include "webkit/fileapi/media/picasa/pmp_constants.h"
13
14 namespace base {
15 class FilePath;
16 } // namespace base
17
18 namespace picasaimport {
19
20 class PmpColumnReader;
21
22 // A helper class used for unit tests only
23 class PmpTestHelper {
24 public:
25 PmpTestHelper();
26
27 bool Init();
28
29 base::FilePath GetTempDirPath();
30
31 template<class T>
32 bool WriteColumnFileFromVector(const std::string& table_name,
33 const std::string& column_name,
34 const PmpFieldType field_type,
35 const std::vector<T>& elements_vector);
36
37 bool InitColumnReaderFromBytes(PmpColumnReader* const reader,
38 const std::vector<uint8>& data,
39 uint32* rows_read);
40
41 static std::vector<uint8> MakeHeader(const PmpFieldType field_type,
42 const uint32 row_count);
43
44 template<class T>
45 static std::vector<uint8> MakeHeaderAndBody(const PmpFieldType field_type,
46 const uint32 row_count,
47 const std::vector<T>& elems);
48
49 private:
50 base::ScopedTempDir temp_dir_;
51 };
52
53 } // namespace picasaimport
54
55 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/media/picasa/pmp_table_reader_unittest.cc ('k') | webkit/fileapi/media/picasa/pmp_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698