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

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

Issue 12704024: Simple PMP reader to parse Picasa's metadata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused constant. 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
12 namespace base {
13
14 class FilePath;
15
16 } // namespace base
17
18 namespace fileapi {
19
20 // A helper class used for unit tests only
21 class PmpTestHelper {
vandebo (ex-Chrome) 2013/03/29 21:35:07 You might want to make this a functional class. I
tommycli 2013/04/01 22:19:18 I could see that being useful. I'll do it if I add
vandebo (ex-Chrome) 2013/04/02 18:10:55 But what if you're not the next one to add a test?
tommycli 2013/04/02 21:12:36 Oh. That's a good point. I'll clean it up then.
22 public:
23 static std::vector<uint8> MakeHeader(const uint16 field_type,
24 const uint32 row_count);
25
26 template<class T>
27 static std::vector<uint8> MakeHeaderAndBody(const uint16 field_type,
28 const uint32 row_count,
29 const std::vector<T>& elems);
30
31 static bool WriteToFile(const base::FilePath& path, std::vector<uint8> data);
32
33 private:
34 // Flatten a vector of elements into an array of bytes.
35 template<class T>
36 static std::vector<uint8> Flatten(const std::vector<T>& elems);
37
38 // Returns a new vector with the concatenated contents of |a| and |b|.
39 static std::vector<uint8> CombinedVectors(const std::vector<uint8>& a,
40 const std::vector<uint8>& b);
41 };
42
43 } // namespace fileapi
44
45 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698